Example usage for org.jfree.chart.renderer.category StatisticalBarRenderer setAutoPopulateSeriesPaint

List of usage examples for org.jfree.chart.renderer.category StatisticalBarRenderer setAutoPopulateSeriesPaint

Introduction

In this page you can find the example usage for org.jfree.chart.renderer.category StatisticalBarRenderer setAutoPopulateSeriesPaint.

Prototype

public void setAutoPopulateSeriesPaint(boolean auto) 

Source Link

Document

Sets the flag that controls whether or not the series paint list is automatically populated when #lookupSeriesPaint(int) is called.

Usage

From source file:playground.thibautd.utils.charts.TwoCategoriesBoxAndWhiskerChart.java

private void createChart() {
    this.chart = ChartFactory.createBoxAndWhiskerChart(chartTitle, xAxisLabel, yAxisLabel, dataset, true); // legend?

    if (plotStdDev) {
        CategoryPlot plot = chart.getCategoryPlot();
        // StatisticalLineAndShapeRenderer renderer =
        //       new StatisticalLineAndShapeRenderer(
        //          false,  // lines from average to average
        //          false ); // shapes 
        StatisticalBarRenderer renderer = new NoLegendStatisticalBarRenderer();
        // do not draw bars
        renderer.setDrawBarOutline(false);
        renderer.setShadowVisible(false);
        renderer.setBasePaint(new Color(0, 0, 0, 0));
        renderer.setAutoPopulateSeriesPaint(false);
        // draw all error bars in black
        renderer.setErrorIndicatorPaint(Color.BLACK);
        plot.setRenderer(1, // index
                renderer);//ww w.  j  a  v  a2 s  .c o  m
        plot.setDataset(1, errorBarsDataset);
        plot.setDatasetRenderingOrder(DatasetRenderingOrder.FORWARD);
    }

    this.addDefaultFormatting();
}