How to change default bar color to my own favorite?
How to change default bar color to my own favorite?
I'm brand-new to jfreechart but find its default bar color is not what I want,how to change it?
you can use this
Code: Select all
JFreeChart chart = ChartFactory.createBarChart3D(title,x,y,dataset,PlotOrientation.VERTICAL,true,true,false);
CategoryPlot plot = chart.getCategoryPlot();
BarRenderer3D renderer = (BarRenderer3D) plot.getRenderer();
renderer.setSeriesPaint(0, new Color(0x990000));