hustcc
hustcc
我觉得这个是合理的。有兴趣来一个 PR 吗,新版本的 G2 5.0 是这么设计的。
rebase 一下 master 应该可以运行了。
项目已经不维护了,如果你有兴趣做起来的话,可以全部整理整理。
Can help to test it in ReactJS 18?
这个需求实际是一个甘特图(gantt),所以 x 轴是任务的时间起止,确实解法就是你说的,设置时间的 scale 类型为 time 或者 datetime。 否则,会把 x 轴的数据当做一个文本,然后等间距,而不是根据时间去映射间距。
这个数据顺序需要你提供从 data 中获取,然后通过设置 scale 的 values 来设置顺序。 ```ts chart.scale("legend", { values: ['现代简约', '简欧'/* ... */] }); ``` @yumanfeng @zss7819
是这个案例吗? ```ts import { Line } from '@antv/g2plot'; const data = [ { year: '1991', value: 3 }, { year: '1992', value: 4 }, { year: '1993', value: 3.5 },...
https://g2.antv.antgroup.com/examples/interesting/interesting/#25d-column 看看这个 DEMO~ 