Example usage for org.jfree.chart.plot PiePlot3D setLabelLinksVisible

List of usage examples for org.jfree.chart.plot PiePlot3D setLabelLinksVisible

Introduction

In this page you can find the example usage for org.jfree.chart.plot PiePlot3D setLabelLinksVisible.

Prototype

public void setLabelLinksVisible(boolean visible) 

Source Link

Document

Sets the flag that controls whether or not label linking lines are visible and sends a PlotChangeEvent to all registered listeners.

Usage

From source file:graphic.Grafico.java

private static javax.swing.JPanel pizza3D(ArrayList nome, ArrayList valor, String tituloGrafico,
        float transparencia, String tipo) {
    DefaultPieDataset data = new DefaultPieDataset();

    for (int i = 0; i < nome.toArray().length; i++) {
        data.setValue("" + nome.get(i).toString(), new Double(valor.get(i).toString()));
    }//w  w  w .ja  va 2 s.  c  om

    JFreeChart chart = ChartFactory.createPieChart3D(tituloGrafico, data, true, true, true);

    java.awt.Color cor = new java.awt.Color(200, 200, 200);
    chart.setBackgroundPaint(cor);
    PiePlot3D plot = (PiePlot3D) chart.getPlot();
    plot.setLabelLinksVisible(true);
    plot.setNoDataMessage("No existem dados para serem exibidos no grfico");

    plot.setStartAngle(90);
    plot.setDirection(Rotation.CLOCKWISE);

    plot.setForegroundAlpha(transparencia);
    plot.setInteriorGap(0.20);

    ChartPanel chartPanel = new ChartPanel(chart);

    return chartPanel;
}

From source file:br.com.ifpb.models.Grafico.java

/**
 * /*from w  ww. j  a  v  a2 s.  co m*/
 * @param nome
 * @param valor
 * @param tituloGrafico
 * @param transparencia
 * @param tipo
 * @return 
 */
private static javax.swing.JPanel pizza3D(ArrayList nome, ArrayList valor, String tituloGrafico,
        float transparencia, String tipo) {

    DefaultPieDataset data = new DefaultPieDataset();

    for (int i = 0; i < nome.toArray().length; i++) {
        data.setValue("" + nome.get(i).toString(), new Double(valor.get(i).toString()));
    }

    JFreeChart chart = ChartFactory.createPieChart3D(tituloGrafico, data, true, true, true);
    java.awt.Color cor = new java.awt.Color(200, 200, 200);
    chart.setBackgroundPaint(cor);
    PiePlot3D plot = (PiePlot3D) chart.getPlot();
    plot.setLabelLinksVisible(true);
    plot.setNoDataMessage("No existem dados para serem exibidos ");

    plot.setStartAngle(90);
    plot.setDirection(Rotation.CLOCKWISE);
    plot.setForegroundAlpha(transparencia);
    plot.setInteriorGap(0.20);

    ChartPanel chartPanel = new ChartPanel(chart);

    return chartPanel;
}

From source file:org.gvsig.symbology.fmap.symbols.PieChart3DSymbol.java

protected Plot getMapPlot() {
    if (mapPlot == null) {
        PiePlot3D myMapPlot;
        try {/* w  w  w.  j  a  v a2  s  .com*/
            myMapPlot = (PiePlot3D) getOutlinePlot().clone();
        } catch (CloneNotSupportedException e) {
            Logger.getLogger(getClass()).error("Error cloning the PieChartSymbol's plot, check consistency");
            myMapPlot = new PiePlot3D();
        }

        myMapPlot.setBackgroundPaint(null);
        myMapPlot.setOutlinePaint(null);
        myMapPlot.setLabelBackgroundPaint(null);
        myMapPlot.setLabelGenerator(null);
        myMapPlot.setLabelLinksVisible(false);
        mapPlot = myMapPlot;
    }
    return mapPlot;
}