Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
55
remove a Trendline from xamDataChart
posted

Hi. I want to remove some trendline, I've tried doing it like this in the codebehind:

Infragistics.Controls.Charts.ValueOverlay overlay = new Infragistics.Controls.Charts.ValueOverlay();
overlay.Brush = Brushes.Green;
overlay.BorderThickness = new Thickness(3);
overlay.Thickness = 3;
overlay.Axis = this.xmYAxis;
overlay.Value = 80.00;
this.xmDataChart.Series.Remove(overlay);

But the Trendline wasn't deleted?

I set the Trendline with this code:

 Infragistics.Controls.Charts.ValueOverlay overlay = new Infragistics.Controls.Charts.ValueOverlay();
 overlay.Brush = Brushes.Green;
 overlay.BorderThickness = new Thickness(3);
 overlay.Thickness = 3;
 overlay.Axis = this.xmYAxis;
overlay.Value = 80.00;
this.xmDataChart.Series.Add(overlay);

Thanks for your help

Parents Reply Children
No Data