Hey,
I have an issue with pie chart's where the chart width is small, the labels do not get cut (auto ellipsis) and the pie become very small if visible at all.
I have used the chart's GetSeriesMark event to add a line break, but this is done for every graph size.
Is there a way to get the rendered pie chart size, to add logic that will truncate the labels if the size is smaller that a certain threshold?.
Example of small chart because of long labels
Another issue, see that in the attached image there is a lot of "wasted" vertical area this is done since the arrow size is fixed for all the marks, is there a way to define that the arrow size will be automatically calculated to get maximum pie size?
Thanks in advance
Elad
Pie chart too small because of long labels
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Pie chart too small because of long labels
Hi Elad,
Thanks in advance.
An option would be using CustomXRadius and CustomYRadius property as discussed here.I have an issue with pie chart's where the chart width is small, the labels do not get cut (auto ellipsis) and the pie become very small if visible at all.
Ok, in that case you can do something as what I did here. You may use that in the GetMarkText event.I have used the chart's GetSeriesMark event to add a line break, but this is done for every graph size.
Is there a way to get the rendered pie chart size, to add logic that will truncate the labels if the size is smaller that a certain threshold?.
I understand which is the problem here but I don't understand why it's related to arrow's size. I guess it's due to Circled property of pie series being set to true. Does setting it to false help? Otherwise, can you please elaborate on why do you think it's arrows size that causes this?Another issue, see that in the attached image there is a lot of "wasted" vertical area this is done since the arrow size is fixed for all the marks, is there a way to define that the arrow size will be automatically calculated to get maximum pie size?
Thanks in advance.
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: Pie chart too small because of long labels
Hey Narcís
What I'm getting at is having a way of ensuring a minimum pie size, either by a built in way or by events.
Like in regular chart when the area becomes too small, some of the legend items are omitted, and longs legend items text gets auto ellipsis (abcdefghijklmnop will become abc...nop)
Thanks in advance.
Elad
Using the CustomXRadius & CustomYRadius will produce a constant size graph which isn't what I'm after.An option would be using CustomXRadius and CustomYRadius property as discussed here.
This will not help me since I do not know when to reduce the text and when to leave it as is, since most of the times when the chart has enough room I will leave the labels as they are.Ok, in that case you can do something as what I did here. You may use that in the GetMarkText event.
The problem is not caused entirely by the arrow size, what I meant was to say that in some case I would like to reduce the arrow size to have more space for the chart.I understand which is the problem here but I don't understand why it's related to arrow's size. I guess it's due to Circled property of pie series being set to true. Does setting it to false help? Otherwise, can you please elaborate on why do you think it's arrows size that causes this?
What I'm getting at is having a way of ensuring a minimum pie size, either by a built in way or by events.
Like in regular chart when the area becomes too small, some of the legend items are omitted, and longs legend items text gets auto ellipsis (abcdefghijklmnop will become abc...nop)
Thanks in advance.
Elad
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Pie chart too small because of long labels
Hi Elad,
It may also help you using CustomChartRect feature as I explained here.
Arrow length can be set this way:The problem is not caused entirely by the arrow size, what I meant was to say that in some case I would like to reduce the arrow size to have more space for the chart.
Code: Select all
pie1.Marks.ArrowLength = 10;
In that case you could check if XRadius and YRadius have a minimum value otherwise set them to a custom value. Otherwise set them back to automatic which is setting them to 0.What I'm getting at is having a way of ensuring a minimum pie size, either by a built in way or by events.
It may also help you using CustomChartRect feature as I explained here.
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: Pie chart too small because of long labels
Thanks Narcis,
I got this working
Elad
I got this working
Elad