antvis/G2

The issue has been closed
数据量较大的柱状图加上滚动条后,如何调整柱宽使符合预期 #5442
KuduroJS posted onGitHub
示例:
按照预期,此时柱宽应是和数据量无关的,不会因数据量变大而变小,滚动显示即可。 类似的问题还有折线图等。
请问怎么解决呢。
示例代码:
/**
* A recreation of this demo: https://observablehq.com/@d3/line-chart
*/
import { Chart } from '@antv/g2';
const chart = new Chart({
container: 'container',
theme: 'classic',
autoFit: true,
});
chart
.interval()
.data({
type: 'fetch',
value:
'https://gw.alipayobjects.com/os/bmw-prod/551d80c6-a6be-4f3c-a82a-abd739e12977.csv',
})
.encode('x', 'date')
.encode('y', 'close')
.scrollbar('x');
chart.render();