OverlaidXYPlot in MultiXYPlot

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Stefan Hagström

OverlaidXYPlot in MultiXYPlot

Post by Stefan Hagström » Fri May 17, 2002 2:03 pm

Hi, how do i add a OverlaidXYPlot in a MultiXYPlot i´m getting a axis not compatible exception on the horizontal axis.

Eventhough the axis are of the same type..



OverlaidXYPlot plot = new OverlaidXYPlot("Datum", "Kurs");
plot.setDomainAxis(new HorizontalDateAxis("Datum"));
VerticalNumberAxis vn = new VerticalNumberAxis("Kurs");
vn.setAutoRangeIncludesZero(false);
plot.setRangeAxis(vn);

/*Add overlaidXY in MultiXY*/
MultiXYPlot oplot = new MultiXYPlot(new VerticalNumberAxis("Value"), MultiXYPlot.VERTICAL);
oplot.setDomainAxis(new HorizontalDateAxis("Datum"));
plot.setRangeAxis(vn);
oplot.add(plot,1);



Regards
Stefan

Stefan Hagström

Re: OverlaidXYPlot in MultiXYPlot

Post by Stefan Hagström » Fri May 17, 2002 7:29 pm

I hope this is possible, i just can´t find what i´m doing wrong here... =/

Stefan Hagström

Re: OverlaidXYPlot in MultiXYPlot

Post by Stefan Hagström » Fri May 17, 2002 7:44 pm

Sorry for my ignorance, just found the problem. =)

If anyone else has this problem: If you use MultiXYPlot.VERTICAL
all the horizontal axis of the subplots should be null.


/Stefan

Locked