Page 1 of 1

Create chart with special timeline

Posted: Tue Sep 16, 2003 7:55 am
by parsonho
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.

Posted: Tue Sep 16, 2003 8:26 am
by parsonho
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));