| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 
 |  
public JPanel createPanelPieIndicators() {
 
        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);
        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;
    } | 
Partager