Displaying numbers ON the pie chart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).

Displaying numbers ON the pie chart

Postby happybuddha » Thu Oct 29, 2009 8:51 am


I have searched extensively on the net for this but wasnt lucky.
I need to display a pie chart (which I will be emailing later, although at the moment I have no idea how I am gonna render the pie chart in my email processor) with values ON the chart. For ex, if its a pie chart displaying the gender of the population of a city. In a simple pie chart with three different colors I need to be able to show Male X% Female Y% Others Z%.
If you could please help/guide me or help me point to a direction, Id be grateful.

Posts: 4
Joined: Thu Oct 29, 2009 8:44 am

Re: Displaying numbers ON the pie chart

Postby david.gilbert » Mon Nov 02, 2009 10:11 pm

Use this:

Code: Select all
PiePlot plot = (PiePlot) chart.getPlot();
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Ask your company to buy the JFreeChart Developer Guide
:idea: Check out other products sold by my company Object Refinery Limited
JFreeChart Project Leader
Posts: 11664
Joined: Fri Mar 14, 2003 10:29 am

Return to JFreeChart

Who is online

Users browsing this forum: Google [Bot] and 12 guests