antvis / G2Plot

:dango: An interactive and responsive charting library based on G2.
https://g2plot.antv.antgroup.com
MIT License
2.56k stars 607 forks source link

柱状图数据为null, 会影响旁边柱子的tooltip #3732

Open gungun0613 opened 10 months ago

gungun0613 commented 10 months ago

import { Chart } from '@antv/g2';

const data = [ { year: 56, sales: 12540 }, { year: 26, sales: 5954 }, { year: 12, sales: 2345 }, { year: -5, sales: null }, { year: 0, sales: null }, ];

const chart = new Chart({ container: 'container', autoFit: true, });

chart.interval().data(data).encode('x', 'year').encode('y', 'sales');

chart.render();

红色框框里面的柱子不显示tooltip