水平条形图的对数比例

水平条形图的对数比例

本文介绍了HighCharts:水平条形图的对数比例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用制作条形图。我的数值范围可以从0到最高100k(例如)。因此,图中的一个条可以非常小,而另一个可以非常长。 HighCharts引入了对数缩放功能。可以看到的例子



我的js代码是用这个文件编写的。我想以对数方式显示我的水平轴(x轴)。我已经插入了如示例中所示的类型键,但脚本进入了必须停止的无限循环。

HighCharts的执行缺陷或对数缩放仍然不成熟?



PS jsfiddle中的注释行导致问题

解决方案

根据,所以可能是这样的情况:

轴的类型,可以是线性或日期时间中的一种,在日期时间轴中,数字在毫秒和刻度线被放置在适当的值上,如全天或天。

自2.1.6起,对数被添加为实验性功能,但尚未完全实现,默认为线性。 b
尝试一下:linear,datetime有规律的间隔,不规则间隔的日期时间,实验性对数轴。


I am working with HighCharts to produce a bar chart. My values can range from as minimal as 0 to as high as 100k (example). Therefore, one bar of the graph can be very small and the other can be very long. HighCharts has introduced the feature of "Logarithmic Scaling". The example of which can be seen HERE

My js code is written in this jsfiddle file. I want to display my horizontal axis (x-Axis) logarithmically. I have inserted the key type as shown in the example but the script goes into an infinite loop which has to be stopped.

What is the flaw in the execution or is logarithmic scaling for HighCharts still not mature?

P.S The commented line in jsfiddle is causing the issue

解决方案

It is still experimental according to the Official Documentation, so that might be the case:

"The type of axis. Can be one of "linear" or "datetime". In a datetime axis, the numbers are given in milliseconds, and tick marks are placed on appropriate values like full hours or days.

As of 2.1.6, "logarithmic" is added as an experimental feature, but it is not yet fully implemented. Defaults to "linear".

Try it: "linear", "datetime" with regular intervals, "datetime" with irregular intervals, experimental "logarithmic" axis."

这篇关于HighCharts:水平条形图的对数比例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-29 04:15