1

When the y axis values are too large for example, 500,000 i would like to automatically use kilo as a prefix multiplier and display the value on the axis as 500K. Is there some algorithm that will help me choose the scaling factor based on the values plotted on the chart?

Most charting libraries are using some logic to determine what is the suitable multiplier and display accordingly as kilo, mega, etc. Is it by looking at the frequency of values (for example, 8 out of 10 values plotted are in thousands) or by just looking at the maximum and minimum?

4

1 回答 1

1

你试过 $.jqplot.LogAxisRenderer 吗?

http://www.jqplot.com/docs/files/plugins/jqplot-logAxisRenderer-js.html

http://www.jqplot.com/docs/files/usage-txt.html

抱歉,我不能直接说出如何用测量值来缩写值,但我相当确定可以使用这个插件来完成。

于 2012-06-07T02:47:43.990 回答