问题描述
我创建了一个气泡图,并输入了一些测试值,如下所示:
I´ve created a bubble chart and I put in some testing values as follow:
this.chart1.Series["blueBubble"].Points.AddXY(2, 3, 6);
this.chart1.Series["redBubble"].Points.AddXY(1, 0, 7);
this.chart1.Series["yellowBubble"].Points.AddXY(1, 3, 8);
当我将特定气泡的大小放入AddXY函数的第三个参数时,按完全错误的比例表示法进行大小调整.见图片:
As I put in the size of the particular bubble to the third parameter of AddXY function, the sizing is done in a completely wrong proportional representation. See picture:
如何将气泡大小更改为正确的命题表示形式?
How can I change the bubble sizes to the right proposition representation?
推荐答案
这看起来很奇怪.
我最好的解释是,大小总是从最小的一组开始,然后按比例将其从1缩放到最大的一组.
The best explanation I have is that the sizes always start with the smallest one set and scale them going from 1 to the largest one set in proprtional steps.
听起来很奇怪?是的.
以下是 BubbleScaleMax 和 BubbleScaleMin
如果设置为自动",将使用 最大尺寸.
If set to Auto, the largest plotted bubble will be displayed using the maximum size.
将这些属性设置为除Auto
以外的其他任何选项都非常棘手;您可以使用此:
Setting these properties to anything else but Auto
is tricky; you could use this:
chart1.Series[0]["BubbleScaleMin"] = "0";
或者小于您的最小尺寸的任何数字小.
Or any number smaller than your smallest size.
或者,如果您愿意,这是一种解决方法:添加一个透明的虚拟点,其大小= 0并具有合适的x和y值:
Or, if you prefer, here is a workaround: Add a transparent dummy point with size = 0 and suitable x- and y-values:
int i = this.chart1.Series[0].Points.AddXY(1, 1, 0);
this.chart1.Series[0].Points[i].Color = Color.Transparent;
之前和之后:
这篇关于参数大小不成比例的气泡图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!