本文介绍了Highcharts 3.0气泡图 - 控制气泡大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Highcharts 3.0可以创建类型为'bubble'的图表,而在3.0之前,有必要使用'scatter'图表并修改标记大小来制作气泡图。旧方式的好处在于您可以完全控制每个气泡的可见像素半径 - 新的气泡图会自动调整气泡的大小,使它们相对于彼此的大小。 是否有任何方法可以关闭此行为或手动设置气泡半径?

很难看到气泡图的大小如何,气泡的大小并不是相对于彼此的大小,可能是有用的。



您应该可以使用minSize和maxSize选项来控制它们:

 泡泡:{
minSize:2,
maxSize:50
}

{{编辑:
实际上,我也没有在文档中看到它们。但你可以在这里看到一个例子:使用任何一个数字作为像素值,或字符串与图表高度的百分比
}}


With Highcharts 3.0 it is possible to create charts with type 'bubble', whereas prior to 3.0 it was necessary to use a 'scatter' chart and modify marker size to make bubble charts. The nice thing about the old way is you had complete control over the visible pixel radius of each bubble--the new bubble charts automatically resize the bubbles so they are sized relative to each other. Is there any way to turn off this behavior or set bubble radius manually?

解决方案

I am having a hard time seeing how a bubble chart, where the bubbles are not sized relative to each other, would be of any use.

You should be able to use the minSize and maxSize options, however, to control them the way that you need to:

bubble: {
                minSize:2,
                maxSize:50
         }

{{edit:I don't see them in the docs either, actually. But you can see an example here: http://jsfiddle.net/fXzke/13/ use either number as pixel value, or string with percent of chart height}}

这篇关于Highcharts 3.0气泡图 - 控制气泡大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-10 19:42