Page 1 of 1
Pie chart too small because of long labels
Posted: Tue Jun 01, 2010 8:23 am
by 9092401
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
Re: Pie chart too small because of long labels
Posted: Tue Jun 01, 2010 2:07 pm
by narcis
Hi Elad,
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.
An option would be using CustomXRadius and CustomYRadius property as discussed
here.
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?.
Ok, in that case you can do something as what I did
here. You may use that in the GetMarkText event.
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?
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?
Thanks in advance.
Re: Pie chart too small because of long labels
Posted: Tue Jun 01, 2010 3:13 pm
by 9092401
Hey NarcĂs
An option would be using CustomXRadius and CustomYRadius property as discussed
here.
Using the CustomXRadius & CustomYRadius will produce a constant size graph which isn't what I'm after.
Ok, in that case you can do something as what I did
here. You may use that in the GetMarkText event.
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.
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?
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.
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
Re: Pie chart too small because of long labels
Posted: Wed Jun 02, 2010 2:18 pm
by narcis
Hi Elad,
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.
Arrow length can be set this way:
What I'm getting at is having a way of ensuring a minimum pie size, either by a built in way or by events.
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.
It may also help you using CustomChartRect feature as I explained
here.
Re: Pie chart too small because of long labels
Posted: Wed Jun 02, 2010 7:42 pm
by 9092401
Thanks Narcis,
I got this working
Elad