I'm using v7.0.0.6, and I would like to have custom labels to appear to right of _some_ bars in a Horizontal Bar chart. My initial attempts have been with the Marks collection, but it seems that I can't change the text values at run-timef, and I can't seem to have only a couple Mark text values appear.
Any thoughts?
- john.
Show only 0-3 Data Point Labels in a Horizontal Bar Graph
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi john,
You have several options to achieve that:
1) Use custom labels when populating series:
2) Using OnGetSeriesMark event and its MarkText parameter.
3) Using Annotation tools. You will find examples of how to use them at TeeChart features demo available at TeeChart's program group.
4) Custom draw on TeeChart's canvas which examples can also be found at TeeChart's features demo.
You have several options to achieve that:
1) Use custom labels when populating series:
Code: Select all
TChart1.Series(0).Add 100, "My Custom Text", clTeeColor
TChart1.Series(0).Add 200, "My Custom Text", clTeeColor
TChart1.Series(0).Marks.Style = smsLabel
3) Using Annotation tools. You will find examples of how to use them at TeeChart features demo available at TeeChart's program group.
4) Custom draw on TeeChart's canvas which examples can also be found at TeeChart's features demo.
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 |
Show only 0-3 Data Point Labels
Thanks for your feedback. Over the weekend I've discovered some of the options you've mentioned. The OnGetSeriesMark/MarkText option was the most useful, however I had to my design structure to use this approach.
The Marks. MarkText feature is the best option because the positioning and other attributes are already taken care of. However, I return to a request/suggestion I have made, and that is to have a Custom Marks Style. In this case the Marks Text would have to be set programmatically or manually.
The OnGetSeriesMark event does allow me to create this sort of functionality, however it would be more elegant, direct, and allow me to maintain the integrity of my design pattern to be able to simply use syntax such as tChart.Series(0).Marks.Item(x).Text = "My Custom Value"
Let me know where I can email you a sample plot, and I'll show you an example of what I'm working with.
Thanks again.
The Marks. MarkText feature is the best option because the positioning and other attributes are already taken care of. However, I return to a request/suggestion I have made, and that is to have a Custom Marks Style. In this case the Marks Text would have to be set programmatically or manually.
The OnGetSeriesMark event does allow me to create this sort of functionality, however it would be more elegant, direct, and allow me to maintain the integrity of my design pattern to be able to simply use syntax such as tChart.Series(0).Marks.Item(x).Text = "My Custom Value"
Let me know where I can email you a sample plot, and I'll show you an example of what I'm working with.
Thanks again.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi jalen,
I'll be glad to have a look at your example. You can post it at our public newsgroups at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.
I'll be glad to have a look at your example. You can post it at our public newsgroups at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.
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 |