简体   繁体   English

设置alignTicksWithAxis时防止Flot Chart重复刻度

[英]Prevent Flot Chart from repeating ticks while alignTicksWithAxis is set

Flot chart is repeating ticks on right Y axis when: 在以下情况下,油量图在右Y轴上重复刻度线:

alignTicksWithAxis:1

I want to align both axes but hide repeated tick values. 我想对齐两个轴,但隐藏重复的刻度值。

http://jsfiddle.net/AUrfY/20/ http://jsfiddle.net/AUrfY/20/

Is there something in the API i have missed or i have to check thicks before painting and hide duplications. API中是否有我遗漏的东西,或者在绘画和隐藏重复项之前必须检查厚度。

Set the tickDecimals option to 2 to get reasonable labels for the right y axis (see this updated fiddle ). tickDecimals选项设置为2可以为右y轴获取合理的标签(请参阅此更新的小提琴 )。 The label values are not really duplicated, but they are rounded so that they seem so. 标签值并不是真正重复的,但会四舍五入,以使它们看起来如此。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM