How to change default bar color to my own favorite?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
du wei
Posts: 2
Joined: Sat Nov 29, 2003 6:34 am

How to change default bar color to my own favorite?

Post by du wei » Sat Jan 10, 2004 1:51 pm

I'm brand-new to jfreechart but find its default bar color is not what I want,how to change it?

akkeri
Posts: 13
Joined: Sat Nov 22, 2003 10:50 pm

Post by akkeri » Mon Jan 12, 2004 1:45 pm

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));

Locked