带有大小参数的不成比例的气泡图

Unproportional Bubble Chart with the size paramater

我创建了一个气泡图并输入了一些测试值如下:

    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 函数的第三个参数时,大小调整是以完全错误的比例表示法完成的。见图:

如何将气泡大小更改为正确的命题表示形式?

这看起来很奇怪。

我的最佳解释是尺寸总是从最小的一组开始,然后按比例从 1 到最大的一组。

听起来很奇怪?是的

这是 BubbleScaleMax and BubbleScaleMin

上 MSDN 上的注释

If set to Auto, the smallest plotted bubble is displayed using the minimum size.

If set to Auto, the largest plotted bubble will be displayed using the maximum size.

将这些属性设置为除 Auto 之外的任何其他属性是棘手的;你可以使用这个:

 chart1.Series[0]["BubbleScaleMin"] = "0";

或比您的最小尺寸更小的任何数字。

或者,如果您愿意,这里有一个解决方法:添加一个大小为 0 且合适的 x- 和 y-values:

的透明虚拟点
int i = this.chart1.Series[0].Points.AddXY(1, 1, 0);
this.chart1.Series[0].Points[i].Color = Color.Transparent;

前后: