how to add an interval maker to xy chart?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Yu

how to add an interval maker to xy chart?

Post by Yu » Wed Feb 05, 2003 11:32 pm

Hi,

I am doing a xy chart using xy chart, I need to add an interval
marker to the chart to highlight the area. I used the following code:

jfreechart.getXYPlot().addDomainMarker(new IntervalMarker(37D, 40D, null, null, null, Color.yellow, 30f));

But it seemed it didn't work. Anybody did this before?
Please help and thanks in advance.

Yu

David Gilbert

Re: how to add an interval maker to xy chart?

Post by David Gilbert » Thu Feb 06, 2003 4:30 pm

That's a piece of code I need to clean up. The IntervalMarker class was created for displaying intervals on the HorizontalNumberAxis class (and, hopefully, other axes later)...I subclassed Marker.java, and now it looks like you should be able to use it for domain and range markers on the plot, but the renderers don't support it yet. Eventually, it will be supported.

Regards,

Dave Gilbert

Locked