Plotting Contract Data on a NumberAxis to remove gaps

Discussion about JFreeChart related to stockmarket charts.
Locked
jrogers
Posts: 4
Joined: Wed Dec 22, 2004 10:43 pm

Plotting Contract Data on a NumberAxis to remove gaps

Post by jrogers » Wed Dec 22, 2004 11:03 pm

Unfortunately, some of the composite contracts have odd hours so the segmented timelines of MondayThroughFriday and FifteenMinute don't work in this case. For example, composite corn trades from 10PM to 1:30AM and 9:30AM to 1:30PM.

The segmented timeline works great for m-f and excluding sat and sun. But for odd hours like above, I end up having to add many exceptions. Since I have many different intervals (1, 5, 15, 30, 60) I would have to add exceptions based on the interval. This would be a lot of exceptions for a 1 minute interval from 1:30PM to 10:30PM.

Since my data is coming from the quote server, technically, the gaps I remove should match the gaps in the data. So why not just display the quotes sequentially?

Wouldn't it be easier to use a NumberAxis and let my data points just be numbered sequentially as 1,2,3,... and then when the tick label gets displayed, convert it to a Date based on some array? I saw something like this on this forum, but unfortunately, the post was not very complete for someone new to this software. I need more help.

Can you briefly explain how to create a special NumberAxis and DataSet to achieve the same thing as a segmented time line? The down side to this is I would be removing gaps that potentially should be there.

Also, what is the relatioship on a RegularTimePeriod on a TimeSeries and the segmented time line? If I have a 15 minute interval, can I use a one minute regular time period?

This would be much appreciated. BTW, JFreeChart is going to be utilized for a new product AgOnline by dtn this spring. The charts are superb, just need an easy way to remove gaps.

Locked