F2 icon indicating copy to clipboard operation
F2 copied to clipboard

F2 v5.0.30 版本中 syncY 这个参数如何使用?

Open LiuJing1014 opened this issue 2 years ago • 4 comments

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

What problem does this feature solve?

添加 syncY 参数可以合并折线图的双Y轴

What does the proposed API look like?

老版本3.8.11 可以直接配置在chart中,但是在v5版本中没看到示例,麻烦给个示例吧,谢谢

LiuJing1014 avatar Dec 29 '23 09:12 LiuJing1014

目前没有这个参数

tangying1027 avatar Jan 02 '24 07:01 tangying1027

那如果要实现双Y轴,要怎么写呢

LiuJing1014 avatar Jan 02 '24 08:01 LiuJing1014

目前只支持双轴的绘制 <Canvas context={context} pixelRatio={1}> <Chart data={data}> <Axis field="genre" tickCount={3} /> <Axis field="y" /> <Axis field="rate" position="right" /> <Interval x="genre" y="y" color={'#1677FF'} /> <Line x="genre" y="rate" color={'#F8D31C'} /> <Legend /> <Tooltip /> </Chart> </Canvas>

对应的tooltip 支持这段时间会加上

tangying1027 avatar Jan 02 '24 08:01 tangying1027

您的意思是目前只支持render函数中存在一个X轴,一个Y轴,后续会把多Y轴的情况添加进来吗

LiuJing1014 avatar Jan 02 '24 08:01 LiuJing1014