Pradeep Reddy Karka
Pradeep Reddy Karka

Reputation: 1

How can I identify a specific data point in tee chart and apply style

I have a Points chart, I need to identify a specific data point and apply the style, below code does the styling for all the points but I need few point to be shown in Circle and few in Cross.

Code

Steema.TeeChart.Styles.Points points = new Steema.TeeChart.Styles.Points(frmApplication.DefInstance.VtChart1.Chart)
points.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Circle;
points.Add(xValue, yValue);

Upvotes: 0

Views: 252

Answers (1)

MarcM
MarcM

Reputation: 144

You can use the GetPointerStyle event to modify the Point

points.Add(0, 4);
points.Add(1, 3);  //more point add etc

//connect to the GetPointerStyle event to modify specific Point Pointerstyle at runtime.
points.GetPointerStyle += new Steema.TeeChart.Styles.CustomPoint.GetPointerStyleEventHandler(point_GetPointerStyle);
}

private void point_GetPointerStyle(Steema.TeeChart.Styles.CustomPoint series, Steema.TeeChart.Styles.GetPointerStyleEventArgs e)
{
  if (e.ValueIndex == 2)
    e.Style = Steema.TeeChart.Styles.PointerStyles.Cross;
  else
    e.Style = Steema.TeeChart.Styles.PointerStyles.Circle;
}

Upvotes: 1

Related Questions