Page 1 of 1

Show only 0-3 Data Point Labels in a Horizontal Bar Graph

Posted: Fri Jan 06, 2006 11:22 pm
by 9529800
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.

Posted: Mon Jan 09, 2006 10:35 am
by narcis
Hi john,

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
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.

Show only 0-3 Data Point Labels

Posted: Mon Jan 09, 2006 4:17 pm
by 9529800
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.

Posted: Mon Jan 09, 2006 4:29 pm
by narcis
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.