简体   繁体   English

Y轴刻度不均匀

[英]Y-axis scale uneven

When using Chart.js i cant find a way to evenly scale the Y axis. 使用Chart.js时,我找不到均匀缩放Y轴的方法。 Overiding and using manual scaling( scaleOverride: true ) for every chart is not really an option since there are alot of them and they have different data. 并不是每个图表都可以覆盖并使用手动缩放比例(scaleOverride:true),因为它们很多而且它们具有不同的数据,因此并不是真正的选择。 Some one have an idea how to fix the scaling of the data? 有人有一个想法如何解决数据的缩放问题?

This is the scaling i want: 这是我想要的缩放比例: 这是我想要的缩放比例

Sometimes the scaling gets uneven depending on the data. 有时,缩放比例会因数据而变得不均匀。

在此处输入图片说明

You can set the options globally - this will apply to every chart instance. 您可以全局设置选项-这将适用于每个图表实例。 For instance 例如

Chart.defaults.global.scaleOverride = true;
...

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

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