This project is read-only.

Multi-Series Set FillColor For Area Does Work

Apr 19, 2012 at 8:34 PM
Edited Apr 19, 2012 at 8:42 PM

I currently have 2 series that I am passing to an area chart. I am setting the FillColor property when I create the series:

 

            seriesItem(sX) = New Series With {
                        .Name = state.ToString, _
                        .Data = New Helpers.Data(chartData), _
                        .PlotOptionsArea = New PlotOptionsArea() With { _
                            .FillColor = New BackColorOrGradient(New Gradient() With { _
            .LinearGradient = {0, 0, 0, 300}, _
            .Stops = New Object(,) {{0, Color.FromArgb(rgb1a, rgb1b, rgb1c)}, {1, Color.FromArgb(rgb2a, rgb2b, rgb2c)}} _
           })}
            }

            SeriesList.Add(seriesItem(sX))

 

While debugging I am seeing that PlotOptions FillColor is being created in the series but when I create the chart the Data element does not contain the FillColor element and the area is filled with default colors.

Am I not passing the value for the FillColor per series correctly?

 

EDIT:

It does work and it did not before because I got so caught up in setting up the RGB values I forgot in the Chart section to add the values:

.SetSeries(SeriesList.[Select](Function(s) New Series() With { _
           .Name = s.Name, _
           .Data = s.Data, _
           .PlotOptionsArea = s.PlotOptionsArea