List of usage examples for org.jfree.chart.plot CategoryPlot configureRangeAxes
public void configureRangeAxes()
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; }