Example usage for org.jfree.chart.plot CategoryPlot configureRangeAxes

List of usage examples for org.jfree.chart.plot CategoryPlot configureRangeAxes

Introduction

In this page you can find the example usage for org.jfree.chart.plot CategoryPlot configureRangeAxes.

Prototype

public void configureRangeAxes() 

Source Link

Document

Configures the range axes.

Usage

From source file:userInterface.SystemAdmin.PovertyAnalysisJPanel.java

private JFreeChart createChart(DefaultCategoryDataset crimeDataset) {
    JFreeChart jfreechart = ChartFactory.createBarChart("Poverty Rate vs Crime Chart", "Network Values",
            "Value", crimeDataset, PlotOrientation.HORIZONTAL, true, true, false);
    CategoryPlot categoryplot = (CategoryPlot) jfreechart.getPlot();

    categoryplot.setDomainGridlinesVisible(true);
    categoryplot.setRangePannable(true);
    categoryplot.setRangeZeroBaselineVisible(true);
    categoryplot.configureRangeAxes();

    NumberAxis numberaxis = (NumberAxis) categoryplot.getRangeAxis();
    numberaxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
    LayeredBarRenderer layeredbarrenderer = new LayeredBarRenderer();
    layeredbarrenderer.setDrawBarOutline(false);
    categoryplot.setRenderer(layeredbarrenderer);

    return jfreechart;
}