Size of Label : PiePlot3D

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Damien75015
Posts: 2
Joined: Wed Apr 13, 2011 8:56 am
antibot: No, of course not.

Size of Label : PiePlot3D

Post by Damien75015 » Wed Apr 13, 2011 9:24 am

Hi Everyone,

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;
	}
Image

Thanks a lot

Damien

Locked