How to change Label of PieCharts ?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
chausberger
Posts: 7
Joined: Sat Sep 01, 2007 4:19 pm

How to change Label of PieCharts ?

Post by chausberger » Fri Jan 18, 2008 6:30 pm

Hello

I figured out how to make a PieChart label display something like this:

Java (5%)
Ruby(2%)
Python(3%)

similar to PieChartDemo2 in the JFreeChart demo.

How can I add an arbitrary String to the label, for example:
Java (5%) Of All Programmers

How can I add "Of All Programmers" ?

best wishes

Claus

mhilpert
Posts: 497
Joined: Wed Apr 02, 2003 1:57 pm
Location: Germany

Post by mhilpert » Tue Jan 22, 2008 11:05 am

E.g.

Code: Select all

        final StandardXYItemLabelGenerator generator = new StandardXYItemLabelGenerator("{1} % Of All Programmers", NumberFormat.getInstance(), NumberFormat.getInstance()); 
Java 11, JFreeChart 1.0.15, JFreeSVG 4.0

Locked