echarts icon indicating copy to clipboard operation
echarts copied to clipboard

[Bug] 当开启 large:true 时, appendData动态数据更新时, tooltip框会消失;When 【large: true 】 is enabled, the tooltip box will disappear when appenddata is updated dynamically

Open leo596566 opened this issue 3 years ago • 2 comments

Version

5.3.2

Link to Minimal Reproduction

https://cdn.jsdelivr.net/npm/[email protected]/dist/echarts.min.js

Steps to Reproduce

` var dom = document.getElementById('container');

var myChart = echarts.init(dom, null, {
    renderer: 'canvas',
    useDirtyRect: false
});

var option;
function getData() {
    let temp = [];
    for (let i = 0; i < 100000; i++) {
        temp.push([
            Math.random()*12.2,Math.random()*12.4
        ]);
    }
    return temp;
}

option = {
    animation:false,
    xAxis: {},
    yAxis: {},
    dataZoom:[
        {
            type: 'inside',
            xAxisIndex: 0,
        }
    ],
    tooltip:{
        annotation:false,
        trigger: 'item'
    },
    series: [
        {
            type: 'scatter',
            animation:false,
            large:true,
            largeThreshold:200,
            progressive:1000000,
            data: getData()
        }
    ]
};

if (option && typeof option === 'object') {
    myChart.setOption(option);
    setInterval(()=>{
        //appendData 时, toolTip框会消失
        //When appendData, the toolTip box will disappear
        myChart.appendData({
                seriesIndex: 0,
                data:[[Math.random()*12.2,Math.random()*12.4]]
            }
        );
        myChart.resize();
    },500)

    myChart.on('mousemove', function(params) {
        // 当appendData 时, 事件会停止一瞬间
        // When appendData, the event stops for a moment
        console.log("mousemove");
    });
}
window.addEventListener('resize', myChart.resize);

`

Current Behavior

更新数据时 tootip 框会消失, 会有显得很卡顿 myChart.appendData({ seriesIndex: 0, data:[[Math.random()*12.2,Math.random()*12.4]] } );

chrome-capture-2022-4-14

Expected Behavior

appendData 时, tooltip 不消失, 事件不暂停

chrome-capture-2022-4-14 (1)

Environment

- OS: win11 
- Browser:  Chrome 98.0.4758.102
- Framework:

Any additional comments?

No response

leo596566 avatar May 14 '22 02:05 leo596566

@lch596566 It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗

TRANSLATED

TITLE

[Bug] When large:true is enabled, the tooltip box will disappear when appendData is updated dynamically; When 【large: true 】 is enabled, the tooltip box will disappear when appenddata is updated dynamically

echarts-bot[bot] avatar May 14 '22 02:05 echarts-bot[bot]

This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.

github-actions[bot] avatar May 13 '24 21:05 github-actions[bot]

This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!

github-actions[bot] avatar May 21 '24 21:05 github-actions[bot]