Area Chart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Jeff Gardner
Posts: 10
Joined: Sun Dec 28, 2003 5:38 pm

Area Chart

Post by Jeff Gardner » Wed May 26, 2004 11:21 pm

I created an area chart,
JFreeChart chart = ChartFactory.createAreaChart(
null, // chart title
xTitle, // domain axis label
yTitle, // range axis label
dataset, // data
PlotOrientation.VERTICAL,
true, // include legend
true, // tooltips
false // urls
);

The ledgend shows the correct colors, however the chart colors looks as if the colors that are over-laid are blended together. Is there any way to keep the colors seperated (the same as in the ledgend.

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Thu May 27, 2004 8:39 am

One of the problems with the area chart is that the last series that is drawn will obscure any series that were drawn previously. To get around that, the demo uses alpha transparency to blend the series where they overlap, just so you get an idea of what is going on with the data. I don't know a good solution to the problem, unless you set the alpha transparency to 1.0 and don't mind not some data being obscured. Or use the stacked area renderer...
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked