Open shukeLiang opened 1 month ago
Data refreshes quickly, and zooming in and out is not possible
It is possible to brush zoom in and out - Demo.
Clicking the brush-zoom toolbar button however is challenging due to the fast refresh.
What is not possible is to see the newly arriving data in the zoomed window. Brushed zoom window shows just a snapshot of the data, yet new data keeps coming on the right side.
Also wondering - what would justify taking zoom snapshots of fast moving data (!?)
Data refreshes quickly, and zooming in and out is not possible
It is possible to brush zoom in and out - Demo. Clicking the brush-zoom toolbar button however is challenging due to the fast refresh. What is not possible is to see the newly arriving data in the zoomed window. Brushed zoom window shows just a snapshot of the data, yet new data keeps coming on the right side. Also wondering - what would justify taking zoom snapshots of fast moving data (!?)
Because our application scenario is to display real-time data, new data is constantly refreshed and added to the canvas, but we need to partially zoom in and analyze the data of the past few minutes ago.
Version
5.4.3
Link to Minimal Reproduction
https://echarts.apache.org/examples/zh/editor.html?c=area-time-axis
Steps to Reproduce
将以下js代码直接复制到上面那个示例的js文件中,然后进行datazoom刷选动作即可复现 var dom = document.getElementById('chart-container'); var myChart = echarts.init(dom, null, { renderer: 'canvas', useDirtyRect: false }); var app = {};
var option;
let base = +new Date(1988, 9, 3); let oneDay = 24 3600 1000; let data = [[base, Math.random() 300]]; for (let i = 1; i < 20000; i++) { let now = new Date((base += oneDay)); data.push([+now, Math.round((Math.random() - 0.5) 20 + data[i - 1][1])]); } setInterval(() => { data[data.length - 1][1] = Math.round((Math.random() - 0.5) * 20 + data[19999][1]); option = { tooltip: { trigger: 'axis', position: function (pt) { return [pt[0], '10%']; } }, title: { left: 'center', text: 'Large Ara Chart' }, toolbox: { feature: { dataZoom: { yAxisIndex: 'none' }, restore: {}, saveAsImage: {} } }, xAxis: { type: 'time', boundaryGap: false }, yAxis: { type: 'value', boundaryGap: [0, '100%'] }, dataZoom: [ { type: 'inside', }, { start: 0, end: 20 } ], series: [ { name: 'Fake Data', type: 'line', smooth: true, symbol: 'none', areaStyle: {}, data: data } ] };
if (option && typeof option === 'object') { myChart.setOption(option); } }, 200)
window.addEventListener('resize', myChart.resize);
Current Behavior
数据快速刷新, 无法进行刷选放大
Expected Behavior
数据快速刷新, 能够正常刷选放大
Environment
Any additional comments?
跟之前这个是同一个问题,请帮忙看看 https://github.com/apache/echarts/issues/10859