0

I have a bubble chart in vb.net with the code below and I would like to make the bubbles appear with a gradient stlyle to look like a ball (rather than a circle)

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

I tried:

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

... and

    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

... but with no success

Any ideas on how to achive this 3d/ball effect?

Thanks

Selrac
  • 2,203
  • 9
  • 41
  • 84

1 Answers1

0

Try changing your 1st option to

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

Note the change to ChartAreas on the third line. I have found that sometimes you think you should be coding against the series, but you should be using ChartAreas.

APrough
  • 2,671
  • 3
  • 23
  • 31
  • Thanks APrough for your quick reply. Unfortunatelly I'm just getting dark blue circles. The ChartAreas don't seem to make any difference – Selrac Apr 10 '13 at 15:08