StackedArea Chart in Time Domain

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
adt
Posts: 1
Joined: Wed Feb 14, 2007 3:03 pm

StackedArea Chart in Time Domain

Post by adt » Wed Feb 14, 2007 3:13 pm

Hi everybody,
I'm trying to write the code to produce a Stacked Area Chart in time domain, that is, the time in on the X axis, and I have float values in Y axis.
I started from examples code and modified to hold DateTime values but without success.
Can anyone give me some code or suggest me the way to get some results?
Thank you in advance
Alberto

SomeOtherUser
Posts: 13
Joined: Thu Apr 06, 2006 7:55 pm

Post by SomeOtherUser » Wed Feb 14, 2007 4:40 pm

Alberto,

It generally helps if you describe your error in detail and provide code so people reading your post can see what's going wrong.

Here's an example using a TimeTableXYDataset (any XYDataset is valid):

Code: Select all

NumberAxis yAxis = new NumberAxis();
DateAxis dateAxis = new DateAxis();
		
XYPlot plot = new XYPlot(new TimeTableXYDataset(), dateAxis, yAxis, new StackedXYAreaRenderer2());
JFreeChart chart = new JFreeChart(plot);

Locked