We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
官方示例中 https://antv-g2.gitee.io/zh/examples/line/basic#curved 将数据中的month改成日期,第7个label消失了,如下 自己本地同样可以复现,antv版本:4.2.8
The text was updated successfully, but these errors were encountered:
@q444937865 代码发出来一下,我们调试一下看看看。可能的原因是开启了 axis label 自动省略,所以第 7 个和第 8 个标签重叠,所以自动隐藏了第 7 个。
Sorry, something went wrong.
@hustcc 直接编辑官方示例代码中的month字段即可 https://antv-g2.gitee.io/zh/examples/line/basic#curved 数据如下: const data = [ { month: '2023-04-01', city: 'Tokyo', temperature: 7 }, { month: '2023-04-01', city: 'London', temperature: 3.9 }, { month: '2023-04-02', city: 'Tokyo', temperature: 6.9 }, { month: '2023-04-02', city: 'London', temperature: 4.2 }, { month: '2023-04-03', city: 'Tokyo', temperature: 9.5 }, { month: '2023-04-03', city: 'London', temperature: 5.7 }, { month: '2023-04-04', city: 'Tokyo', temperature: 14.5 }, { month: '2023-04-04', city: 'London', temperature: 8.5 }, { month: '2023-04-05', city: 'Tokyo', temperature: 18.4 }, { month: '2023-04-05', city: 'London', temperature: 11.9 }, { month: '2023-04-06', city: 'Tokyo', temperature: 21.5 }, { month: '2023-04-06', city: 'London', temperature: 15.2 }, { month: '2023-04-07', city: 'Tokyo', temperature: 25.2 }, { month: '2023-04-07', city: 'London', temperature: 17 }, { month: '2023-04-08', city: 'Tokyo', temperature: 26.5 }, { month: '2023-04-08', city: 'London', temperature: 16.6 }, ]; 应该不是标签重叠的问题,将面板拉宽后,这么宽明显是放的下
设置一下代码:
chart.scale('month', { type: 'cat' });
原因是,G2 默认推断出数据为日期类型,所以在 04-06 和 04-08 之间补充了 04-07 这个间距。
hustcc
No branches or pull requests
官方示例中 https://antv-g2.gitee.io/zh/examples/line/basic#curved
将数据中的month改成日期,第7个label消失了,如下
自己本地同样可以复现,antv版本:4.2.8
The text was updated successfully, but these errors were encountered: