3

I have a horizontal bar which I want to change colour when in range, which works, however the bar has a gradient and can see how to disable the gradient and change colour.

Color[] colors = new Color[] { Color.Red, Color.Green }; 
BarItem myBar = pane1.AddBar("Null", list1Null, Color.Red);
myBar.Bar.Fill = new Fill(colors);
myBar.Bar.Fill.Type = FillType.GradientByY;

Has anyone achieved this please?

chasher
  • 149
  • 11

1 Answers1

2

GradientByY has this description - "Fill with a single solid color based on the Y value of the data." Before

However it has a gradient, by adding:

myBar.Bar.Fill.SecondaryValueGradientColor = Color.Empty;

It no longer has a gradient, just solid red or green, just what I wanted!

Fixed Green

chasher
  • 149
  • 11