Rendering X interval for time series chart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Marius
Posts: 1
Joined: Thu Oct 30, 2014 1:31 pm
antibot: No, of course not.

Rendering X interval for time series chart

Post by Marius » Thu Oct 30, 2014 1:59 pm

Hi.

Let's say I've created a time series chart with the following data:

Code: Select all

TimeSeries timeseries = new TimeSeries("Series 1");
timeseries.add(new Day(1, 1, 2002), 100);
timeseries.add(new Day(3, 1, 2002), 200);
Image

However, I want that the length of the time period is shown along the X axis (here: 1 day). I want the graph to look as follows (magic Paint skills!)
Image

How can this be achieved? The data is there (getFirstMillisecond(), getLastMillisecond()) of RegularTimePeriod). I want this data to be drawn as X-axis intervals.

Obviously I'm not looking for a hack such as "just insert a value every X seconds.

Cheers!
Marius

Locked