I'm attempting to set a bar in a chart to gradient color using the following code, but something is missing. What else do I need?
chartSeries.Type = ChartSeriesType.Bar
chartSeries.Appearance.FillStyle.MainColor = Drawing.Color.Beige
chartSeries.Appearance.FillStyle.SecondColor = Drawing.Color.Aqua
chartSeries.Appearance.FillStyle.FillType = Styles.FillType.ComplexGradient
I get the following error message...
ColorBlend object that was set is not valid.Array of colors and positions must contain at least two elements. ColorBlend objects must be constructed with the same number of positions and color values. Positions must be between 0.0 and 1.0, 1.0 indicating the last element in the array.