jfreechart customize piechart to show absolute values and percentages
Use the MessageFormat symbol {1} for the absolute section value. See StandardPieSectionLabelGenerator for details. public class MyMinimalPieChartExample { private static final String KEY1 = “Datum 1”; public static final String KEY2 = “Datum 2”; public static void main(String[] args) { DefaultPieDataset dataset = new DefaultPieDataset(); dataset.setValue(KEY1, 99); dataset.setValue(KEY2, 77); JFreeChart someChart = ChartFactory.createPieChart( “Header”, dataset, … Read more