Hello,
I have a graph with Stack Columns bars.
I want to add a permanent mark on the top of the bar with the total number of the bar ,and to add a different mark, that will be shown by Mouse Hover event and will show only the number of the selected area.
Can you please advice what is the best way to do it ?
Thank you
How to add marks on stack colunms bars graph
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hello qcrnd,
In that case I'd use Annotation tools for the sum values and MarksTip tool for each value mark. You can use Annotations like this:
In that case I'd use Annotation tools for the sum values and MarksTip tool for each value mark. You can use Annotations like this:
Code: Select all
tChart1.Draw();
for (int i = 0; i < line1.Count; i++)
{
Steema.TeeChart.Tools.Annotation annotation1 = new Steema.TeeChart.Tools.Annotation(tChart1.Chart);
double tmp = 0;
for (int j = 0; j < tChart1.Series.Count; j++)
{
tmp += tChart1[j].YValues[i];
}
annotation1.Text = tmp.ToString();
annotation1.Shape.CustomPosition = true;
annotation1.Shape.Left = line1.CalcXPos(i);
annotation1.Shape.Top = line1.CalcYPos(i);
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |