F2 icon indicating copy to clipboard operation
F2 copied to clipboard

折线图点击空白区域出现多余的数据

Open zim-lee opened this issue 3 years ago • 0 comments

刚开始渲染两个月数据,没有问题,切换月份后只剩一个月数据再次渲染时,之前月份的数据在点击空白出会显示出来

const chart = new F2.Chart({
            el: chartRef.current,
            pixelRatio: window.devicePixelRatio,
            width: window.innerWidth - 24,
            height: 300,
            plugins: [Animation, Tooltip],
        });
        chart.clear();
        chart.source(source);
        chart.line().position('dateId*value').shape('smooth');
        chart.tooltip({
            alwaysShow: true,
            triggerOn: 'touchstart',
            onChange: obj => {
                const { items } = obj;
                items[0].name = items[0].title;
            },
        });
        chart.render();

f2版本:3.8.9

test

zim-lee avatar Jun 25 '21 08:06 zim-lee