vb.net气泡图表在每个布雷中使用渐变样式,使其看起来像一个球

时间:2013-04-10 14:32:07

标签: vb.net 3d bubble-chart

我在vb.net中有一个带有下面代码的气泡图,我想让气泡看起来像一个渐变的stlyle看起来像一个球(而不是一个圆圈)

Dim xValues As Double() = {10.62, 75.54, 60.45}
Dim yValues As Double() = {650.62, 50.54, 600.45}
Dim size As Integer() = {10, 20, 30}
Dim names As String() = {"a", "b", "c"}


Chart5.Series("Series1").ChartType = SeriesChartType.Bubble
Chart5.Series("Series1").Points.DataBindXY(xValues, yValues, size, names)
Chart5.Series("Series1").MarkerStyle = MarkerStyle.Circle
For i = 0 To 2
        Chart5.Series("Series1").Points(i).Label = names(i)
Next

我试过了:

    Chart_Analysis.Series("Series1").BackSecondaryColor = Drawing.Color.Green
    Chart_Analysis.Series("Series1").MarkerColor = Drawing.Color.Blue
    Chart_Analysis.Series("Series1").BackGradientStyle = GradientStyle.Center

...和

    For i = Region_From To Region_To
        Chart_Analysis.Series("Series1").Points(i).Label = names(i)
        Chart_Analysis.Series("Series1").Points(i).BackGradientStyle = GradientStyle.Center
        Chart_Analysis.Series("Series1").Points(i).Color = Drawing.Color.Aqua
        Chart_Analysis.Series("Series1").Points(i).BackSecondaryColor = Drawing.Color.Green
    Next

......但没有成功

关于如何实现这种3D /球效果的任何想法?

由于

1 个答案:

答案 0 :(得分:0)

尝试将第一个选项更改为

Chart_Analysis.Series("Series1").BackSecondaryColor = Drawing.Color.Green
Chart_Analysis.Series("Series1").MarkerColor = Drawing.Color.Blue
Chart_Analysis.ChartAreas("Series1").BackGradientStyle = GradientStyle.Center

请注意第三行中对ChartAreas的更改。我发现有时候你认为你应该对这个系列进行编码,但你应该使用ChartAreas。