antvis/G2

如何在单个y轴下展示组合图表,比如折线图和柱状图组合,而不是产生两个y轴? #3862

xiekailian posted onGitHub

  • I have searched the issues of this repository and believe that this is not a duplicate.

https://g2.antv.vision/zh/examples/column/dodge#grouped

Steps to reproduce

按照官网链接的配置,会生成多轴的图表,想要像google的组合图表一样

Environment Info
g2 4.1.49
System -
Browser -

<!-- generated by antv-issue-helper. DO NOT REMOVE -->


想要像google的组合图表这样 <img width="702" alt="image" src="https://user-images.githubusercontent.com/18750815/162896840-e7c98758-aa31-4465-9892-ddea8797ecab.png">

posted by xiekailian about 3 years ago

其实实现原理一样的,就在图形中增加 line 和 interval 就自动实现了。也可以使用 G2Plot 封装好现成的。

https://g2plot.antv.vision/zh/examples/dual-axes/column-line#custom-column-line

posted by hustcc almost 3 years ago

Fund this Issue

$0.00
Funded

Pull requests