I use the Frameworks Jfreechart for generate a 3D chart and i am looking for how i can change the size of the label . I use a PiePlot3D object in the Jfreechart. I find how i can change the police but i can't find how i can change the size of the label.
Source:
Code: Select all
public JPanel createPanelPieIndicators() {
private Font oFontLabelPlot = new Font("Arial", Font.ITALIC, 9);
this.oPieIndicator = new DefaultPieDataset();
JFreeChart chart = ChartFactory.createPieChart3D("", this.oPieIndicator, true, true, false);
chart.setTitle(new TextTitle("répartition des indicateurs", this.oFontTitle));
chart.getTitle().setPaint(COLOR_GRAY);
chart.setBackgroundPaint(Color.WHITE);
chart.getLegend().setBorder(0, 0, 0, 0);
ChartPanel oPanelPieIndicators = new ChartPanel(chart);
oPanelPieIndicators.setMinimumDrawWidth(400);
oPanelPieIndicators.setMinimumDrawHeight(300);
oPanelPieIndicators.setBorder(null);
oPanelPieIndicators.setRangeZoomable(true);
oPanelPieIndicators.setLayout(new BorderLayout(0, 0));
oPanelPieIndicators.setBackground(COLOR_BLUE_SKY);
PiePlot3D plot = (PiePlot3D) chart.getPlot();
plot.setLabelGenerator(new StandardPieSectionLabelGenerator("{0}:{1} \n({2})"));
plot.setLabelFont(this.oFontLabelPlot); // size
plot.setLabelBackgroundPaint(COLOR_BLUE_SKY);
plot.setStartAngle(100);
plot.setDirection(Rotation.ANTICLOCKWISE);
plot.setForegroundAlpha(0.3f);
plot.setBackgroundPaint(Color.WHITE);
plot.setOutlineVisible(false);
for (int i = 0; i <= this.aPieIndicator.length - 1; i++){
plot.setSectionPaint(this.aPieIndicator[i], this.aColorPieIndicator[i]);
}
return oPanelPieIndicators;
}
Thanks a lot
Damien