Example usage for org.jfree.chart.renderer.xy XYBoxAndWhiskerRenderer setAutoPopulateSeriesOutlinePaint

List of usage examples for org.jfree.chart.renderer.xy XYBoxAndWhiskerRenderer setAutoPopulateSeriesOutlinePaint

Introduction

In this page you can find the example usage for org.jfree.chart.renderer.xy XYBoxAndWhiskerRenderer setAutoPopulateSeriesOutlinePaint.

Prototype

public void setAutoPopulateSeriesOutlinePaint(boolean auto) 

Source Link

Document

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

Usage

From source file:org.webcat.grader.graphs.BoxAndWhiskerChart.java

@Override
protected JFreeChart generateChart(WCChartTheme chartTheme) {
    setChartHeight(36);//from w  w  w  .ja  va  2  s.c  om

    JFreeChart chart = ChartFactory.createBoxAndWhiskerChart(null, null, yAxisLabel(), boxAndWhiskerXYDataset(),
            false);
    chart.getXYPlot().setOrientation(PlotOrientation.HORIZONTAL);
    chart.setPadding(new RectangleInsets(0, 6, 0, 6));

    XYPlot plot = chart.getXYPlot();
    plot.setInsets(RectangleInsets.ZERO_INSETS);
    plot.setOutlineVisible(false);
    plot.setBackgroundPaint(new Color(0, 0, 0, 0));
    XYBoxAndWhiskerRenderer renderer = (XYBoxAndWhiskerRenderer) plot.getRenderer();
    renderer.setAutoPopulateSeriesOutlinePaint(true);

    ValueAxis domainAxis = plot.getDomainAxis();
    domainAxis.setVisible(false);

    NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
    rangeAxis.setRange(-0.5, assignmentOffering.assignment().submissionProfile().availablePoints() + 0.5);
    rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());

    Font oldFont = rangeAxis.getTickLabelFont();
    rangeAxis.setTickLabelFont(oldFont.deriveFont(oldFont.getSize2D() * 0.8f));

    return chart;
}