List of usage examples for org.jfree.chart.renderer BarRenderer3D setBaseOutlinePaint
public void setBaseOutlinePaint(Paint paint)
From source file:include.picture.MyBarChart.java
/** *? *//*from ww w .j a v a2 s . c o m*/ public void paint() { try { check(); CategoryDataset dataset = getDataSet(series, category, data); JFreeChart chart = ChartFactory.createBarChart3D(title, axisXLabel, axisYLabel, dataset, PlotOrientation.VERTICAL, true, false, false); chart.setBackgroundPaint(Color.WHITE); BarRenderer3D renderer = new BarRenderer3D(); CategoryPlot plot = chart.getCategoryPlot(); renderer.setMaxBarWidth(0.01); renderer.setBaseOutlinePaint(Color.BLACK); renderer.setItemLabelGenerator(new StandardCategoryItemLabelGenerator()); renderer.setItemLabelFont(new Font("", Font.PLAIN, 15)); renderer.setItemLabelsVisible(true); renderer.setItemMargin(0.1); plot.setRenderer(renderer); FileOutputStream fos_jpg = null; try { fos_jpg = new FileOutputStream(fileName); ChartUtilities.writeChartAsJPEG(fos_jpg, 1000, chart, width, height, null); } finally { try { fos_jpg.close(); } catch (Exception e) { } } } catch (Exception e) { e.printStackTrace(); } // end of try-catch }