import-bot (20212) [Avatar] Offline
#1
[Originally posted by raj_sakthi]

Hi Martien,
Congradulations are in order for a great book...!
I am working on creating an exploding pie chart. As far as I could see,
GD::Graph does not support that. So my questions are

--> Are you planning on supporting it in future or is there any additional
modules I am missing ?

--> Is there a way to display the percentage on the pie or below the pie..?

Thanks

-RS
import-bot (20212) [Avatar] Offline
#2
Re: Exploding Pie chart and such
[Originally posted by mgjv]

> Hi Martien,
> Congradulations are in order for a great book...!
> I am working on creating an exploding pie chart. As far as I could see,
> GD::Graph does not support that. So my questions are

Indeed, GD::graph doesn't support it at the moment.


> --> Are you planning on supporting it in future or is there any additional
> modules I am missing ?

Yes, I do have plans to support this. The problem is that it is not a trivial
problem to solve, especially since GD doesn't have really good support for
connecting up lines and arcs. This means that sometimes there will be a pixel
gap in between the arc and the line that are drawn, resulting in leaking of
the fill colour. I have started some work in modularising the drawing of pie
slices, with the view of being able to then draw them independently, but,
because of abovementioned problems, have not really been able to finalise it.

I'll probably need another few months smilie

> --> Is there a way to display the percentage on the pie or below the pie..?

The easiest way to do it now is to add it to the label (maybe using the
GD::Graph:smilieata module to help you a bit. I'm also working on making the
legend and labelling of pies a bit more flexible.

Sorry I can't give you more hopeful news right now.

Martien
import-bot (20212) [Avatar] Offline
#3
Re: Exploding Pie chart and such
[Originally posted by raj_sakthi]

Thanks for the prompt response Martien.
IS there any other way to draw exploding pie chart like using IMAGE::Magic or
such..?

Thanks again

_RS_
import-bot (20212) [Avatar] Offline
#4
Re: Exploding Pie chart and such
[Originally posted by mgjv]

> Thanks for the prompt response Martien.
> IS there any other way to draw exploding pie chart like using IMAGE::Magic or
> such..?

Not without doing a lot of calculations and graphics work yourself.

You could investigate some of the other charting modules on CPAN. Many other
people have kept working on their modules since I last looked at them, and
some might have already implemented these things.

Exploding pie charts with 3D support is not at all trivial, since the drawing
order and colouring of the pie slices needs to be done correctly, and in the
correct order. Without 3D support it wouldn't be too hard. I'll have a look
whether I can implement at least that bit.

Martien