Question

I have a chart with series of type "point". I would like to display an additional data near every point, just like toolTip, only I want it permanent and not only on mouse hover.

For example lets say I have a datbase with points, and for each point there is x,y and some unique label. If that is how I display points on my chart:

 Series series = new Series("Default");
 series.ChartType = SeriesChartType.Point; 

for(int i=0; i<datbase.Count; i++)
{
 chart.Series[0].Points.AddXY(database[i].x,database[i].y);
}

how to get a graph with the points on it, and above each point displayed its unique label?

Thanks

Was it helpful?

Solution

You could try the following:

Series series = new Series("Default");
series.ChartType = SeriesChartType.Point; 

for(int i=0; i<datbase.Count; i++)
{
  int index = chart.Series[0].Points.AddXY(database[i].x,database[i].y);
  chart.Series[0].Points[index].Label = "Your Label Text";
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top