org.jfree.chart.util.TableOrder Java Examples

The following examples show how to use org.jfree.chart.util.TableOrder. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Chart_12_MultiplePiePlot_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * Creates a new plot.
 *
 * @param dataset  the dataset (<code>null</code> permitted).
 */
public MultiplePiePlot(CategoryDataset dataset) {
    super();
    this.dataset = dataset;
    PiePlot piePlot = new PiePlot(null);
    this.pieChart = new JFreeChart(piePlot);
    this.pieChart.removeLegend();
    this.dataExtractOrder = TableOrder.BY_COLUMN;
    this.pieChart.setBackgroundPaint(null);
    TextTitle seriesTitle = new TextTitle("Series Title",
            new Font("SansSerif", Font.BOLD, 12));
    seriesTitle.setPosition(RectangleEdge.BOTTOM);
    this.pieChart.setTitle(seriesTitle);
    this.aggregatedItemsKey = "Other";
    this.aggregatedItemsPaint = Color.lightGray;
    this.sectionPaints = new HashMap();
}
 
Example #2
Source File: arja3_three_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * Creates a new plot.
 *
 * @param dataset  the dataset (<code>null</code> permitted).
 */
public MultiplePiePlot(CategoryDataset dataset) {
    super();
    this.dataset = dataset;
    PiePlot piePlot = new PiePlot(null);
    this.pieChart = new JFreeChart(piePlot);
    this.pieChart.removeLegend();
    setDataset(dataset);
    this.dataExtractOrder = TableOrder.BY_COLUMN;
    this.pieChart.setBackgroundPaint(null);
    TextTitle seriesTitle = new TextTitle("Series Title",
            new Font("SansSerif", Font.BOLD, 12));
    seriesTitle.setPosition(RectangleEdge.BOTTOM);
    this.pieChart.setTitle(seriesTitle);
    this.aggregatedItemsKey = "Other";
    this.aggregatedItemsPaint = Color.lightGray;
    this.sectionPaints = new HashMap();
}
 
Example #3
Source File: arja3_three_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * Creates a new plot.
 *
 * @param dataset  the dataset (<code>null</code> permitted).
 */
public MultiplePiePlot(CategoryDataset dataset) {
    super();
    this.dataset = dataset;
    PiePlot piePlot = new PiePlot(null);
    this.pieChart = new JFreeChart(piePlot);
    this.pieChart.removeLegend();
    this.dataExtractOrder = TableOrder.BY_COLUMN;
    this.pieChart.setBackgroundPaint(null);
    TextTitle seriesTitle = new TextTitle("Series Title",
            new Font("SansSerif", Font.BOLD, 12));
    seriesTitle.setPosition(RectangleEdge.BOTTOM);
    this.pieChart.setTitle(seriesTitle);
    this.aggregatedItemsKey = "Other";
    this.aggregatedItemsPaint = Color.lightGray;
    this.sectionPaints = new HashMap();
}
 
Example #4
Source File: Chart_12_MultiplePiePlot_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * Creates a new plot.
 *
 * @param dataset  the dataset (<code>null</code> permitted).
 */
public MultiplePiePlot(CategoryDataset dataset) {
    super();
    setDataset(dataset);
    PiePlot piePlot = new PiePlot(null);
    this.pieChart = new JFreeChart(piePlot);
    this.pieChart.removeLegend();
    this.dataExtractOrder = TableOrder.BY_COLUMN;
    this.pieChart.setBackgroundPaint(null);
    TextTitle seriesTitle = new TextTitle("Series Title",
            new Font("SansSerif", Font.BOLD, 12));
    seriesTitle.setPosition(RectangleEdge.BOTTOM);
    this.pieChart.setTitle(seriesTitle);
    this.aggregatedItemsKey = "Other";
    this.aggregatedItemsPaint = Color.lightGray;
    this.sectionPaints = new HashMap();
}
 
Example #5
Source File: Arja_002_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * Creates a new plot.
 *
 * @param dataset  the dataset (<code>null</code> permitted).
 */
public MultiplePiePlot(CategoryDataset dataset) {
    super();
    this.dataset = dataset;
    PiePlot piePlot = new PiePlot(null);
    this.pieChart = new JFreeChart(piePlot);
    this.pieChart.removeLegend();
    this.dataExtractOrder = TableOrder.BY_COLUMN;
    this.pieChart.setBackgroundPaint(null);
    TextTitle seriesTitle = new TextTitle("Series Title",
            new Font("SansSerif", Font.BOLD, 12));
    seriesTitle.setPosition(RectangleEdge.BOTTOM);
    this.pieChart.setTitle(seriesTitle);
    this.aggregatedItemsKey = "Other";
    this.aggregatedItemsPaint = Color.lightGray;
    this.sectionPaints = new HashMap();
}
 
Example #6
Source File: Arja_0063_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * Creates a new plot.
 *
 * @param dataset  the dataset (<code>null</code> permitted).
 */
public MultiplePiePlot(CategoryDataset dataset) {
    super();
    this.dataset = dataset;
    PiePlot piePlot = new PiePlot(null);
    this.pieChart = new JFreeChart(piePlot);
    if (dataset != null) {
    	  dataset.addChangeListener(this);
    	}
    this.dataExtractOrder = TableOrder.BY_COLUMN;
    this.pieChart.setBackgroundPaint(null);
    TextTitle seriesTitle = new TextTitle("Series Title",
            new Font("SansSerif", Font.BOLD, 12));
    seriesTitle.setPosition(RectangleEdge.BOTTOM);
    this.pieChart.setTitle(seriesTitle);
    this.aggregatedItemsKey = "Other";
    this.aggregatedItemsPaint = Color.lightGray;
    this.sectionPaints = new HashMap();
}
 
Example #7
Source File: Arja_0090_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * Creates a new plot.
 *
 * @param dataset  the dataset (<code>null</code> permitted).
 */
public MultiplePiePlot(CategoryDataset dataset) {
    super();
    this.dataset = dataset;
    PiePlot piePlot = new PiePlot(null);
    this.pieChart = new JFreeChart(piePlot);
    this.pieChart.removeLegend();
    this.dataExtractOrder = TableOrder.BY_COLUMN;
    this.pieChart.setBackgroundPaint(null);
    TextTitle seriesTitle = new TextTitle("Series Title",
            new Font("SansSerif", Font.BOLD, 12));
    seriesTitle.setPosition(RectangleEdge.BOTTOM);
    this.pieChart.setTitle(seriesTitle);
    this.aggregatedItemsKey = "Other";
    this.aggregatedItemsPaint = Color.lightGray;
    this.sectionPaints = new HashMap();
}
 
Example #8
Source File: arja3_three_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * Creates a new plot.
 *
 * @param dataset  the dataset (<code>null</code> permitted).
 */
public MultiplePiePlot(CategoryDataset dataset) {
    super();
    this.dataset = dataset;
    PiePlot piePlot = new PiePlot(null);
    this.pieChart = new JFreeChart(piePlot);
    this.pieChart.removeLegend();
    setDataset(dataset);
    this.dataExtractOrder = TableOrder.BY_COLUMN;
    this.pieChart.setBackgroundPaint(null);
    TextTitle seriesTitle = new TextTitle("Series Title",
            new Font("SansSerif", Font.BOLD, 12));
    seriesTitle.setPosition(RectangleEdge.BOTTOM);
    this.pieChart.setTitle(seriesTitle);
    this.aggregatedItemsKey = "Other";
    this.aggregatedItemsPaint = Color.lightGray;
    this.sectionPaints = new HashMap();
}
 
Example #9
Source File: Arja_00162_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * Creates a new plot.
 *
 * @param dataset  the dataset (<code>null</code> permitted).
 */
public MultiplePiePlot(CategoryDataset dataset) {
    super();
    this.dataset = dataset;
    PiePlot piePlot = new PiePlot(null);
    this.pieChart = new JFreeChart(piePlot);
    this.pieChart.removeLegend();
    this.dataExtractOrder = TableOrder.BY_COLUMN;
    this.pieChart.setBackgroundPaint(null);
    TextTitle seriesTitle = new TextTitle("Series Title",
            new Font("SansSerif", Font.BOLD, 12));
    seriesTitle.setPosition(RectangleEdge.BOTTOM);
    this.pieChart.setTitle(seriesTitle);
    this.aggregatedItemsKey = "Other";
    this.aggregatedItemsPaint = Color.lightGray;
    this.sectionPaints = new HashMap();
}
 
Example #10
Source File: Arja_0063_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * Creates a new plot.
 *
 * @param dataset  the dataset (<code>null</code> permitted).
 */
public MultiplePiePlot(CategoryDataset dataset) {
    super();
    this.dataset = dataset;
    PiePlot piePlot = new PiePlot(null);
    this.pieChart = new JFreeChart(piePlot);
    this.pieChart.removeLegend();
    this.dataExtractOrder = TableOrder.BY_COLUMN;
    this.pieChart.setBackgroundPaint(null);
    TextTitle seriesTitle = new TextTitle("Series Title",
            new Font("SansSerif", Font.BOLD, 12));
    seriesTitle.setPosition(RectangleEdge.BOTTOM);
    this.pieChart.setTitle(seriesTitle);
    this.aggregatedItemsKey = "Other";
    this.aggregatedItemsPaint = Color.lightGray;
    this.sectionPaints = new HashMap();
}
 
Example #11
Source File: Arja_00148_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * Creates a new plot.
 *
 * @param dataset  the dataset (<code>null</code> permitted).
 */
public MultiplePiePlot(CategoryDataset dataset) {
    super();
    this.dataset = dataset;
    PiePlot piePlot = new PiePlot(null);
    this.pieChart = new JFreeChart(piePlot);
    this.pieChart.removeLegend();
    this.dataExtractOrder = TableOrder.BY_COLUMN;
    this.pieChart.setBackgroundPaint(null);
    TextTitle seriesTitle = new TextTitle("Series Title",
            new Font("SansSerif", Font.BOLD, 12));
    seriesTitle.setPosition(RectangleEdge.BOTTOM);
    this.pieChart.setTitle(seriesTitle);
    this.aggregatedItemsKey = "Other";
    this.aggregatedItemsPaint = Color.lightGray;
    this.sectionPaints = new HashMap();
}
 
Example #12
Source File: Arja_00131_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * Creates a new plot.
 *
 * @param dataset  the dataset (<code>null</code> permitted).
 */
public MultiplePiePlot(CategoryDataset dataset) {
    super();
    this.dataset = dataset;
    PiePlot piePlot = new PiePlot(null);
    this.pieChart = new JFreeChart(piePlot);
    this.pieChart.removeLegend();
    this.dataExtractOrder = TableOrder.BY_COLUMN;
    this.pieChart.setBackgroundPaint(null);
    TextTitle seriesTitle = new TextTitle("Series Title",
            new Font("SansSerif", Font.BOLD, 12));
    seriesTitle.setPosition(RectangleEdge.BOTTOM);
    this.pieChart.setTitle(seriesTitle);
    this.aggregatedItemsKey = "Other";
    this.aggregatedItemsPaint = Color.lightGray;
    this.sectionPaints = new HashMap();
}
 
Example #13
Source File: Arja_00131_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * Creates a new plot.
 *
 * @param dataset  the dataset (<code>null</code> permitted).
 */
public MultiplePiePlot(CategoryDataset dataset) {
    super();
    this.dataset = dataset;
    PiePlot piePlot = new PiePlot(null);
    this.pieChart = new JFreeChart(piePlot);
    this.pieChart.removeLegend();
    this.dataExtractOrder = TableOrder.BY_COLUMN;
    if (dataset != null) {
        setDatasetGroup(dataset.getGroup());
        dataset.addChangeListener(this);
    }
    this.pieChart.setBackgroundPaint(null);
    TextTitle seriesTitle = new TextTitle("Series Title",
            new Font("SansSerif", Font.BOLD, 12));
    seriesTitle.setPosition(RectangleEdge.BOTTOM);
    this.pieChart.setTitle(seriesTitle);
    this.aggregatedItemsKey = "Other";
    this.aggregatedItemsPaint = Color.lightGray;
    this.sectionPaints = new HashMap();
}
 
Example #14
Source File: Arja_00174_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * Creates a new plot.
 *
 * @param dataset  the dataset (<code>null</code> permitted).
 */
public MultiplePiePlot(CategoryDataset dataset) {
    super();
    this.dataset = dataset;
    PiePlot piePlot = new PiePlot(null);
    this.pieChart = new JFreeChart(piePlot);
    this.pieChart.removeLegend();
    this.dataExtractOrder = TableOrder.BY_COLUMN;
    this.pieChart.setBackgroundPaint(null);
    TextTitle seriesTitle = new TextTitle("Series Title",
            new Font("SansSerif", Font.BOLD, 12));
    seriesTitle.setPosition(RectangleEdge.BOTTOM);
    this.pieChart.setTitle(seriesTitle);
    this.aggregatedItemsKey = "Other";
    if (dataset != null) {
        setDatasetGroup(dataset.getGroup());
        dataset.addChangeListener(this);
    }
    this.aggregatedItemsPaint = Color.lightGray;
    this.sectionPaints = new HashMap();
}
 
Example #15
Source File: Arja_001_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * Creates a new plot.
 *
 * @param dataset  the dataset (<code>null</code> permitted).
 */
public MultiplePiePlot(CategoryDataset dataset) {
    super();
    this.dataset = dataset;
    PiePlot piePlot = new PiePlot(null);
    this.pieChart = new JFreeChart(piePlot);
    this.pieChart.removeLegend();
    this.dataExtractOrder = TableOrder.BY_COLUMN;
    this.pieChart.setBackgroundPaint(null);
    TextTitle seriesTitle = new TextTitle("Series Title",
            new Font("SansSerif", Font.BOLD, 12));
    seriesTitle.setPosition(RectangleEdge.BOTTOM);
    if (dataset != null) {
    	  setDatasetGroup(dataset.getGroup());
    	  dataset.addChangeListener(this);
    	}
    this.aggregatedItemsKey = "Other";
    this.aggregatedItemsPaint = Color.lightGray;
    this.sectionPaints = new HashMap();
}
 
Example #16
Source File: Arja_001_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * Creates a new plot.
 *
 * @param dataset  the dataset (<code>null</code> permitted).
 */
public MultiplePiePlot(CategoryDataset dataset) {
    super();
    this.dataset = dataset;
    PiePlot piePlot = new PiePlot(null);
    this.pieChart = new JFreeChart(piePlot);
    this.pieChart.removeLegend();
    this.dataExtractOrder = TableOrder.BY_COLUMN;
    this.pieChart.setBackgroundPaint(null);
    TextTitle seriesTitle = new TextTitle("Series Title",
            new Font("SansSerif", Font.BOLD, 12));
    seriesTitle.setPosition(RectangleEdge.BOTTOM);
    this.pieChart.setTitle(seriesTitle);
    this.aggregatedItemsKey = "Other";
    this.aggregatedItemsPaint = Color.lightGray;
    this.sectionPaints = new HashMap();
}
 
Example #17
Source File: Arja_00162_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * Creates a new plot.
 *
 * @param dataset  the dataset (<code>null</code> permitted).
 */
public MultiplePiePlot(CategoryDataset dataset) {
    super();
    this.dataset = dataset;
    PiePlot piePlot = new PiePlot(null);
    this.pieChart = new JFreeChart(piePlot);
    this.pieChart.removeLegend();
    this.dataExtractOrder = TableOrder.BY_COLUMN;
    this.pieChart.setBackgroundPaint(null);
    TextTitle seriesTitle = new TextTitle("Series Title",
            new Font("SansSerif", Font.BOLD, 12));
    seriesTitle.setPosition(RectangleEdge.BOTTOM);
    this.pieChart.setTitle(seriesTitle);
    if (dataset != null) {
        setDatasetGroup(dataset.getGroup());
        dataset.addChangeListener(this);
    }
    this.aggregatedItemsKey = "Other";
    this.aggregatedItemsPaint = Color.lightGray;
    this.sectionPaints = new HashMap();
}
 
Example #18
Source File: arja3_three_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * Creates a new plot.
 *
 * @param dataset  the dataset (<code>null</code> permitted).
 */
public MultiplePiePlot(CategoryDataset dataset) {
    super();
    this.dataset = dataset;
    PiePlot piePlot = new PiePlot(null);
    this.pieChart = new JFreeChart(piePlot);
    this.pieChart.removeLegend();
    this.dataExtractOrder = TableOrder.BY_COLUMN;
    this.pieChart.setBackgroundPaint(null);
    TextTitle seriesTitle = new TextTitle("Series Title",
            new Font("SansSerif", Font.BOLD, 12));
    seriesTitle.setPosition(RectangleEdge.BOTTOM);
    this.pieChart.setTitle(seriesTitle);
    this.aggregatedItemsKey = "Other";
    this.aggregatedItemsPaint = Color.lightGray;
    this.sectionPaints = new HashMap();
}
 
Example #19
Source File: Arja_001_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Sets the data extract order (by row or by column) and sends a
 * {@link PlotChangeEvent} to all registered listeners.
 *
 * @param order  the order (<code>null</code> not permitted).
 */
public void setDataExtractOrder(TableOrder order) {
    if (order == null) {
        throw new IllegalArgumentException("Null 'order' argument");
    }
    this.dataExtractOrder = order;
    fireChangeEvent();
}
 
Example #20
Source File: Arja_001_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Sets the data extract order (by row or by column) and sends a
 * {@link PlotChangeEvent} to all registered listeners.
 *
 * @param order  the order (<code>null</code> not permitted).
 */
public void setDataExtractOrder(TableOrder order) {
    if (order == null) {
        throw new IllegalArgumentException("Null 'order' argument");
    }
    this.dataExtractOrder = order;
    fireChangeEvent();
}
 
Example #21
Source File: 1_MultiplePiePlot.java    From SimFix with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Sets the data extract order (by row or by column) and sends a
 * {@link PlotChangeEvent} to all registered listeners.
 *
 * @param order  the order (<code>null</code> not permitted).
 */
public void setDataExtractOrder(TableOrder order) {
    if (order == null) {
        throw new IllegalArgumentException("Null 'order' argument");
    }
    this.dataExtractOrder = order;
    fireChangeEvent();
}
 
Example #22
Source File: Arja_00174_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Sets the data extract order (by row or by column) and sends a
 * {@link PlotChangeEvent} to all registered listeners.
 *
 * @param order  the order (<code>null</code> not permitted).
 */
public void setDataExtractOrder(TableOrder order) {
    if (order == null) {
        throw new IllegalArgumentException("Null 'order' argument");
    }
    this.dataExtractOrder = order;
    fireChangeEvent();
}
 
Example #23
Source File: arja3_three_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Sets the data extract order (by row or by column) and sends a
 * {@link PlotChangeEvent} to all registered listeners.
 *
 * @param order  the order (<code>null</code> not permitted).
 */
public void setDataExtractOrder(TableOrder order) {
    if (order == null) {
        throw new IllegalArgumentException("Null 'order' argument");
    }
    this.dataExtractOrder = order;
    fireChangeEvent();
}
 
Example #24
Source File: Arja_00148_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Sets the data extract order (by row or by column) and sends a
 * {@link PlotChangeEvent} to all registered listeners.
 *
 * @param order  the order (<code>null</code> not permitted).
 */
public void setDataExtractOrder(TableOrder order) {
    if (order == null) {
        throw new IllegalArgumentException("Null 'order' argument");
    }
    this.dataExtractOrder = order;
    fireChangeEvent();
}
 
Example #25
Source File: Arja_00174_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Sets the data extract order (by row or by column) and sends a
 * {@link PlotChangeEvent} to all registered listeners.
 *
 * @param order  the order (<code>null</code> not permitted).
 */
public void setDataExtractOrder(TableOrder order) {
    if (order == null) {
        throw new IllegalArgumentException("Null 'order' argument");
    }
    this.dataExtractOrder = order;
    fireChangeEvent();
}
 
Example #26
Source File: Arja_00148_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Sets the data extract order (by row or by column) and sends a
 * {@link PlotChangeEvent} to all registered listeners.
 *
 * @param order  the order (<code>null</code> not permitted).
 */
public void setDataExtractOrder(TableOrder order) {
    if (order == null) {
        throw new IllegalArgumentException("Null 'order' argument");
    }
    this.dataExtractOrder = order;
    fireChangeEvent();
}
 
Example #27
Source File: 1_MultiplePiePlot.java    From SimFix with GNU General Public License v2.0 5 votes vote down vote up
/**
     * Creates a new plot.
     *
     * @param dataset  the dataset (<code>null</code> permitted).
     */
    public MultiplePiePlot(CategoryDataset dataset) {
// start of generated patch
super();
this.dataset=dataset;
if(dataset!=null){
dataset.addChangeListener(this);
}
PiePlot piePlot=new PiePlot(null);
// end of generated patch
/* start of original code
        super();
        this.dataset = dataset;
        PiePlot piePlot = new PiePlot(null);
 end of original code*/
        this.pieChart = new JFreeChart(piePlot);
        this.pieChart.removeLegend();
        this.dataExtractOrder = TableOrder.BY_COLUMN;
        this.pieChart.setBackgroundPaint(null);
        TextTitle seriesTitle = new TextTitle("Series Title",
                new Font("SansSerif", Font.BOLD, 12));
        seriesTitle.setPosition(RectangleEdge.BOTTOM);
        this.pieChart.setTitle(seriesTitle);
        this.aggregatedItemsKey = "Other";
        this.aggregatedItemsPaint = Color.lightGray;
        this.sectionPaints = new HashMap();
    }
 
Example #28
Source File: Arja_00162_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Sets the data extract order (by row or by column) and sends a
 * {@link PlotChangeEvent} to all registered listeners.
 *
 * @param order  the order (<code>null</code> not permitted).
 */
public void setDataExtractOrder(TableOrder order) {
    if (order == null) {
        throw new IllegalArgumentException("Null 'order' argument");
    }
    this.dataExtractOrder = order;
    fireChangeEvent();
}
 
Example #29
Source File: ChartImageGenerator.java    From dhis2-core with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
private JFreeChart getMultiplePieChart( final Visualization visualization, CategoryDataset[] dataSets )
{
    JFreeChart multiplePieChart = ChartFactory.createMultiplePieChart( visualization.getName(), dataSets[0], TableOrder.BY_ROW,
        !visualization.isHideLegend(), false, false );

    setBasicConfig( multiplePieChart, visualization );

    if ( multiplePieChart.getLegend() != null )
    {
        multiplePieChart.getLegend().setItemFont( SUB_TITLE_FONT );
    }

    MultiplePiePlot multiplePiePlot = (MultiplePiePlot) multiplePieChart.getPlot();
    JFreeChart pieChart = multiplePiePlot.getPieChart();
    pieChart.setBackgroundPaint( DEFAULT_BACKGROUND_COLOR );
    pieChart.getTitle().setFont( SUB_TITLE_FONT );

    PiePlot piePlot = (PiePlot) pieChart.getPlot();
    piePlot.setBackgroundPaint( DEFAULT_BACKGROUND_COLOR );
    piePlot.setOutlinePaint( DEFAULT_BACKGROUND_COLOR );
    piePlot.setLabelFont( LABEL_FONT );
    piePlot.setLabelGenerator( new StandardPieSectionLabelGenerator( "{2}" ) );
    piePlot.setSimpleLabels( true );
    piePlot.setIgnoreZeroValues( true );
    piePlot.setIgnoreNullValues( true );
    piePlot.setShadowXOffset( 0d );
    piePlot.setShadowYOffset( 0d );

    for ( int i = 0; i < dataSets[0].getColumnCount(); i++ )
    {
        piePlot.setSectionPaint( dataSets[0].getColumnKey( i ), COLORS[(i % COLORS.length)] );
    }

    return multiplePieChart;
}
 
Example #30
Source File: 1_MultiplePiePlot.java    From SimFix with GNU General Public License v2.0 5 votes vote down vote up
/**
     * Creates a new plot.
     *
     * @param dataset  the dataset (<code>null</code> permitted).
     */
    public MultiplePiePlot(CategoryDataset dataset) {
        super();
// start of generated patch
if(dataset!=null){
dataset.addChangeListener(this);
}
this.dataset=dataset;
PiePlot piePlot=new PiePlot(null);
this.pieChart=new JFreeChart(piePlot);
// end of generated patch
/* start of original code
        this.dataset = dataset;
        PiePlot piePlot = new PiePlot(null);
        this.pieChart = new JFreeChart(piePlot);
 end of original code*/
        this.pieChart.removeLegend();
        this.dataExtractOrder = TableOrder.BY_COLUMN;
        this.pieChart.setBackgroundPaint(null);
        TextTitle seriesTitle = new TextTitle("Series Title",
                new Font("SansSerif", Font.BOLD, 12));
        seriesTitle.setPosition(RectangleEdge.BOTTOM);
        this.pieChart.setTitle(seriesTitle);
        this.aggregatedItemsKey = "Other";
        this.aggregatedItemsPaint = Color.lightGray;
        this.sectionPaints = new HashMap();
    }