JFreeChart Axe x is time. How to code : No datas then no spaces ?

T

Tintin92

Hello,

Please answer this question only if you know JFreeChart.

I try to use this library :
http://www.jfree.org/jfreechart/


Here how I load the datas :

Code:

date[1] = DateUtilities.createDate(2001, 3, 21, 12, 0);
high[1] = 130.0;
low[1] = 100.0;
open[1] = 102.0;
close[1] = 115.0;
volume[1] = 150.0;

date[2] = DateUtilities.createDate(2001, 3, 22, 12, 0);
high[2] = 110.0;
low[2] = 70.0;
open[2] = 90.0;
close[2] = 82.0;
volume[2] = 160.0;

date[3] = DateUtilities.createDate(2001, 3, 25, 12, 0);
high[3] = 90.0;
low[3] = 70.0;
open[3] = 82.0;
close[3] = 88.0;
volume[3] = 360.0;

Here how I display it :

Code:

OHLCDataset ohlcdataset = new DefaultHighLowDataset("Intel", date,
high, low, open, close, volume);

JFreeChart chart = ChartFactory.createCandlestickChart(
"Lesson 1 Graph", "Date", "Price", ohlcdataset, true);



There are no datas between the 03-22-2001 and 03-25-2001.
JFreeChart display space for 03-23-2001 and 03-24-2001
I dont want spaces.
I try to do the folowing :
no datas = no spaces.
How to do it ?

Thanks,

Tintin92
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top