echarts
echarts copied to clipboard
[Feature] 是否能支持y轴配置0刻度对齐
What problem does this feature solve?
当我使用双y轴的时候,主y轴有负值,次y轴没有负值,这样导致0刻度不对齐,容易误导看数,
What does the proposed API look like?
y轴支持配置0刻度对齐,次y轴的0刻度和主y轴的0刻度对齐
@daisy0123 It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
TRANSLATED
TITLE
[Feature] Whether the y-axis configuration of 0 scale equivalence can be supported
BODY
What problem does this feature solve?
When I use double y-axis, the main y-axis has negative values, and the secondary y-axis has no negative values, which leads to unequal 0 scales, which is easy to mislead the reading.
What does the proposed API look like?
The y-axis supports configuration of 0 scale equivalence
试一试启用 yAxis.alignTicks
坐标轴刻度对齐看看?
Is this a solution? with yAxis.min and alignTicks - Demo Code
Is this a solution? with yAxis.min and alignTicks - Demo Code
我这边不是固定写一个图表,是数据平台,通过查询的数据进行绘制,需要获取y轴的间隔数据才能设置y轴的最小值,需要计算,所以希望平台可以提供这个参数配置
It needs to be calculated, so I hope the platform can provide this parameter configuration
Currently it is not automatic, but yAxis.min could indeed be calculated and set - Demo Code Does this work with your data?
It needs to be calculated, so I hope the platform can provide this parameter configuration
Currently it is not automatic, but yAxis.min could indeed be calculated and set - Demo Code Does this work with your data?
非常感谢,不过希望可以初次绘制的时候就能达到这样的效果,等绘制完再getoption处理 对数据平台的性能有所影响,我们的面板承载的报表很多,所以希望echarts在首次绘制y轴刻度的时候就根据配置开关来计算,实现0刻度对齐
It needs to be calculated, so I hope the platform can provide this parameter configuration
Currently it is not automatic, but yAxis.min could indeed be calculated and set - Demo Code Does this work with your data?
在网上找了很多方案,发现不少人也是有这个需求的,但是他们计算的规则和我的数据不符合
getoption processing will have an impact on the performance of the data platform I hope that echarts will draw the y-axis scale for the first time
Of course it could be done without getOption - Demo Code Now all you have to do is fill xdata, yd1 and yd2 with your data and give it a go.
getoption processing will have an impact on the performance of the data platform I hope that echarts will draw the y-axis scale for the first time
Of course it could be done without getOption - Demo Code Now all you have to do is fill xdata, yd1 and yd2 with your data and give it a go.
thanks,I try try.
getoption processing will have an impact on the performance of the data platform I hope that echarts will draw the y-axis scale for the first time
Of course it could be done without getOption - Demo Code Now all you have to do is fill xdata, yd1 and yd2 with your data and give it a go.
还是不行,我其中一个图表的数据是这样的 yd1 = [ 1356664864, 1465570182, 1530020458, 1540500149, 1480651815, 1502250584, 1575832697, 102514202, 108905318, 64450276, 10479691, -59848334, 21598769, 73582113 ]; yd2 = [ 0.08173994170406937, 0.08027429683621555, 0.04397624678201866, 0.006849379657118284, -0.038849937170632495, 0.014587338347334548, 0.048981251053386174 ];
their calculation rules do not match my data.
I see, turns out my method too does not work for all data combinations. When data is so different the logical choice is to build two separate charts.
their calculation rules do not match my data.
I see, turns out my method too does not work for all data combinations. When data is so different the logical choice is to build two separate charts.
我这边支持用户拖拽做表,所以数据是不固定 无规则,差异也无规则的,我在绘制的时候处理很难兼容全部数据case,希望echarts在计算y轴的时候支持0刻度对齐,支持配置,
their calculation rules do not match my data.
I see, turns out my method too does not work for all data combinations. When data is so different the logical choice is to build two separate charts.
你好,这个有下文么?可以帮忙支持吗
+1 同需要 多y轴,0刻度对齐。
+1
项目需要,手动敲了个粗糙的对齐功能 示例 就是没显示零刻度线,其他对齐了
@Hoody123 - looks pretty good!
Even with @daisy0123's latest (strange) example data - Demo.
Maybe you found the magic formula 🧙
+1 同需要 多y轴,0刻度对齐。