Hi,
This is a quick question that I am sure I have overlooked somewhere. I want to create a chart with effectively 5 lines on it representing volumes of fluid per day over a year. Three are on one scale shown on the left and the other two are on a different scale (cumulative) shown on the right. I've based what I have done so far on the freechart-sample/xy_chart.jsp and classes.
Using the javadocs I have worked out how to create multiple lines on the same axis (XYSeriesCollection) but this does not help with the problem described above. The cumulative values (to be shown on the right axis) are significantly higher than the daily ones (shown on the left axis) so the graph doesn't really work with one scale. Tried dabbling with the OverlaidXYPlot but get null pointer exceptions so must be doing something wrong.
Any help appreciated.
Cheers
Robbie.
Left and Right Value Axes
Re: Left and Right Value Axes
Robbie,
I've seen it mentioned in this phorum that the next release of JFreeChart will allow you to have two y-axises, each with its own scale. So that will solve your problem. Search through the phorum and you'll probably find a posting describing it. To get the new code, you'll probably have pull an early version of it out of source forge if its allowed.
Don
I've seen it mentioned in this phorum that the next release of JFreeChart will allow you to have two y-axises, each with its own scale. So that will solve your problem. Search through the phorum and you'll probably find a posting describing it. To get the new code, you'll probably have pull an early version of it out of source forge if its allowed.
Don
Re: Left and Right Value Axes
Hi Robbie,
Don is correct, dual axes are working in the CVS version of JFreeChart which you can check out from the project page on SourceForge. Some refinements will be made before 0.9.5 is released, but I don't think the changes will be major.
Regards,
Dave Gilbert
Don is correct, dual axes are working in the CVS version of JFreeChart which you can check out from the project page on SourceForge. Some refinements will be made before 0.9.5 is released, but I don't think the changes will be major.
Regards,
Dave Gilbert