This is an automated email from the ASF dual-hosted git repository. ovilia pushed a commit to branch feat-jitter in repository https://gitbox.apache.org/repos/asf/echarts-examples.git
commit fec46dc816bc03a907390f0783ce97c5df3d2268 Author: Ovilia <zwl.s...@gmail.com> AuthorDate: Thu Jul 31 16:41:15 2025 +0800 doc: add example of jitterOverlap --- .../ts/doc-example/scatter-jitter-avoidOverlap.js | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/public/examples/ts/doc-example/scatter-jitter-avoidOverlap.js b/public/examples/ts/doc-example/scatter-jitter-avoidOverlap.js new file mode 100644 index 00000000..fe147989 --- /dev/null +++ b/public/examples/ts/doc-example/scatter-jitter-avoidOverlap.js @@ -0,0 +1,37 @@ +const grid = { + left: 80, + right: 50 +}; +const width = myChart.getWidth() - grid.left - grid.right; +const data = []; +for (let day = 0; day < 7; ++day) { + for (let i = 0; i < 30; ++i) { + const y = Math.tan(i) / 2 + 7; + data.push([day, y, Math.random()]); + } +} +option = { + title: { + text: 'Scatter with Jittering' + }, + grid, + xAxis: { + type: 'category', + jitter: (width / 7) * 0.8, + jitterOverlap: false, + data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] + }, + yAxis: { + type: 'value', + max: 10, + min: 0 + }, + series: [ + { + name: 'Sleeping Hours', + type: 'scatter', + data, + colorBy: 'data' + } + ] +}; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org