Create chart with special timeline

Discussion about JFreeChart related to stockmarket charts.
Locked
parsonho
Posts: 4
Joined: Mon Sep 15, 2003 2:05 am

Create chart with special timeline

Post by parsonho » Tue Sep 16, 2003 7:55 am

Is it possible to create a chart (other than HighLowChart) with a special timeline such as the Monday through Friday timeline?

I have tried "createHighLowChart" and it works properly. However, I found that there have no API provided for other kind of chart.

parsonho
Posts: 4
Joined: Mon Sep 15, 2003 2:05 am

Post by parsonho » Tue Sep 16, 2003 8:26 am

Get the XYPlot of the chart and set the DomainAxis with SegmentedTimeline as shown below:

SegmentedTimeline segmentedTimeline = SegmentedTimeline.newMondayThroughFridayTimeline();

XYPlot xyPlot = chart.getXYPlot();
xyPlot.setDomainAxis(new DateAxis("", segmentedTimeline));

Locked