apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.44k stars 19.61k forks source link

lines使用effect后 无法clear() #8225

Closed insecthole closed 3 years ago

insecthole commented 6 years ago

One-line summary [问题简述]

lines使用effect后,clear(),方法无法清除干净

Version & Environment [版本及环境]

Expected behaviour [期望结果]

ECharts option [ECharts配置项]

option = {
 xAxis: {
            min: 0,
            max: 200
        },
        yAxis: {
            min: 0,
            max: 200
        },
        color:"black",
        series: [{
            coordinateSystem: 'cartesian2d',
            type: 'lines',
            data: [{
                coords: [[0, 66], [122, 150]],
            }],
            effect: {
                show: true,
                color: "white"

            },
        }]
}

Other comments [其他信息]

Adelaide1014 commented 6 years ago

需要注意加载顺序,若是图标没有加载完成就执行了chart.clear();就不会起作用; 可以

setTimeout(function() {
    chart.clear();
    //chart.dispose();
}, 10000);
chj-damon commented 5 years ago

同样遇到了这个问题,clear之后,线还在,但是像是残影一样