G2Plot
G2Plot copied to clipboard
🥰 [FEATURE] 支持折线图的坐标轴逆序
已经有解决方案了,折线图的坐标轴逆序可以用面积图来模拟
import { Area } from '@antv/g2plot';
fetch('https://gw.alipayobjects.com/os/bmw-prod/360c3eae-0c73-46f0-a982-4746a6095010.json')
.then((res) => res.json())
.then((data) => {
const area = new Area('container', {
data,
xField: 'timePeriod',
yField: 'value',
xAxis: {
position: 'top',
},
smooth: true,
coordinate: [{ type: 'reflectY' }],
areaStyle: {
fill: ''
},
});
area.render();
});