Hello,
Is there a way to change the color of one point in a values of the trendline?
regards,
Marc
trendfunction change color 1 point (the last)
Re: trendfunction change color 1 point (the last)
Hi Marc,
Have you tried with the line series' GetPointerStyle event? The following code works fine for me here:
Have you tried with the line series' GetPointerStyle event? The following code works fine for me here:
Code: Select all
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
Steema.TeeChart.Styles.Area area1 = new Steema.TeeChart.Styles.Area(tChart1.Chart);
area1.FillSampleValues();
Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
Steema.TeeChart.Functions.TrendFunction trend1 = new Steema.TeeChart.Functions.TrendFunction();
line1.Function = trend1;
line1.DataSource = area1;
line1.Pointer.Visible = true;
line1.GetPointerStyle += new Steema.TeeChart.Styles.CustomPoint.GetPointerStyleEventHandler(line1_GetPointerStyle);
}
void line1_GetPointerStyle(Steema.TeeChart.Styles.CustomPoint series, Steema.TeeChart.Styles.GetPointerStyleEventArgs e)
{
if (e.ValueIndex == series.Count-1) e.Color = Color.Red;
}
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |