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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With