I have a chart with long legend entries. Therefore the width of the chart is smaller than the legend. I would like to keep the legend on the right side of the chart. How can I split the legend entries to two lines? I created the text of the entries during run-time.
Thanks in advance.
Kind regards,
Rolf
How to create a multiline legend entry
-
- Newbie
- Posts: 18
- Joined: Fri Nov 15, 2002 12:00 am
Hi, Rolf.
This feature is not yet supported. You'll have to use chart OnGetLegend** events to customize individual legend item position and text. There are some examples about customizing legend items available in TeeChart demo.
This feature is not yet supported. You'll have to use chart OnGetLegend** events to customize individual legend item position and text. There are some examples about customizing legend items available in TeeChart demo.
Marjan Slatinek,
http://www.steema.com
http://www.steema.com
-
- Newbie
- Posts: 18
- Joined: Fri Nov 15, 2002 12:00 am
Hi Marjan,
I didn't find an example with multiline legend entries. My wish is to automate the multiline option: if the string for the legend entry contains a line break it should automatically generate two lines. The only way I see is to use OnGetLegendText:
- Check if there is a line break in the legend entry
- If yes then
1.solution: Increase the space between the entries (Is it only possible for all spaces , not for individual between two entries?) and write the rest of the string in the space (how to do that?).
2.solution: Make additional entries and write the text there. But is it possible to make entries without series? Do I have to create empty series to have additional legend entries? I use checkboxes. Is it possible to hide the checkboxes and legend symbol for some entries?
Maybe you know another, better workaround?
Kind regards,
Rolf
I didn't find an example with multiline legend entries. My wish is to automate the multiline option: if the string for the legend entry contains a line break it should automatically generate two lines. The only way I see is to use OnGetLegendText:
- Check if there is a line break in the legend entry
- If yes then
1.solution: Increase the space between the entries (Is it only possible for all spaces , not for individual between two entries?) and write the rest of the string in the space (how to do that?).
2.solution: Make additional entries and write the text there. But is it possible to make entries without series? Do I have to create empty series to have additional legend entries? I use checkboxes. Is it possible to hide the checkboxes and legend symbol for some entries?
Maybe you know another, better workaround?
Kind regards,
Rolf
Hi Rolf,
the best workaround I can think of, is the custom drawing on the Legend. There's an example in the Demo Features project under All Features -> Welcome ! -> Miscellaneous -> Legend -> Drawing more text
the best workaround I can think of, is the custom drawing on the Legend. There's an example in the Demo Features project under All Features -> Welcome ! -> Miscellaneous -> Legend -> Drawing more text
Pep Jorge
http://support.steema.com
http://support.steema.com