Hello!
My application needs to display a second legend using a TExtraLegendTool. For each legend item, the symbol will be a different sized square which will correspond to the point size of that data item as drawn on the graph. My problem is that when I get the symbols the way I want them, the legend item text is covered up by the symbol.
For example:
I would like the text to adjust to the right, more like this :
Other than artificially padding the left hand side of the text with spaces, how can I convince the text to move over far enough to not be overwritten by the symbol?
Thank you,
erzsebet
Extra Legend Tool: Large Symbols Overwrite Legend Item Text
Re: Extra Legend Tool: Large Symbols Overwrite Legend Item Text
It's just me again...
Is there any way that I could configure a relatively sized legend that is not a TExtraLegendTool and is aligned to the bottom of the chart? The code I have now for a default, bottom aligned legend with various sized rectangles overwrites both the text and the boundaries of the legend panel. Here's a picture of what I mean: Thanks!!
Is there any way that I could configure a relatively sized legend that is not a TExtraLegendTool and is aligned to the bottom of the chart? The code I have now for a default, bottom aligned legend with various sized rectangles overwrites both the text and the boundaries of the legend panel. Here's a picture of what I mean: Thanks!!
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Extra Legend Tool: Large Symbols Overwrite Legend Item Text
Hi erzsebet,
You could use custom symbols doing something as in the All Features\Welcome!\Miscellaneous\Legend\Symbol OnDraw example at the new features demo, available at TeeChart's program group.Other than artificially padding the left hand side of the text with spaces, how can I convince the text to move over far enough to not be overwritten by the symbol?
Does the Symbol OnDraw approach helps on this?Is there any way that I could configure a relatively sized legend that is not a TExtraLegendTool and is aligned to the bottom of the chart?
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 |
Re: Extra Legend Tool: Large Symbols Overwrite Legend Item Text
Narcís, hello -
I was already leveraging the Chart.Legend.Symbol.OnDraw event to create the differently sized squares. I have also overloaded the Chart.OnGetLegendText event to customize the strings displayed next to each of the sized symbols. I was not able to get these events to produce the look I wanted without calculating an amount of 'padding' I needed to add to the right-side of the text to force enough space for the symbol. That is okay, because we did get the legend looking really nice - mostly thanks to the super component you all provide!
As far as the bottom aligned legend goes, we decided to drop that as a requirement, and always display the sized legend on the right side of the chart.
Thank you very much for getting back to me,
-erzsebet
I was already leveraging the Chart.Legend.Symbol.OnDraw event to create the differently sized squares. I have also overloaded the Chart.OnGetLegendText event to customize the strings displayed next to each of the sized symbols. I was not able to get these events to produce the look I wanted without calculating an amount of 'padding' I needed to add to the right-side of the text to force enough space for the symbol. That is okay, because we did get the legend looking really nice - mostly thanks to the super component you all provide!
As far as the bottom aligned legend goes, we decided to drop that as a requirement, and always display the sized legend on the right side of the chart.
Thank you very much for getting back to me,
-erzsebet