I see the multiple (dual) axis option is now in the repository. I (and I'm sure many others) appreciate your efforts in getting this into the source.
I do have one question though, regarding using the dual axis feature, must you have to distinct datasets inorder for this to work. I think it would be a nice feature to allow one dataset to contain all the data, but be able to specify on the dataset which axis it will belong to. For right now, I am creating 2 datasets and having to add their lengths(data) together inorder to set other chart parameters( colors, etc.).
Wondering your thoughts on this!
Thanks again for the dual axis feature!
Stacey
Multiple y axis--Thanks (and dataset question)!
Re: Multiple y axis--Thanks (and dataset question)!
Hi Stacey,
Thanks for your post! The dual axis code is coming along nicely, but it has required some fairly low level changes to the code so it will take a bit of time to straighten out some of the quirks it has introduced.
There is a good reason for requiring a second dataset to plot against the additional axis. The dataset interfaces should not specify anything about how data is presented, only the structure and values of the data. So to add a method or methods that tell you which axis a series should be plotted against would be going against that principle. So, instead, there is now a 'secondary' dataset, and all the data in that dataset gets plotted against the secondary axis.
There is also an optional secondary renderer, which gives you the opportunity to change the presentation of the data that is plotted against the secondary axis. I've revised the PriceVolumeDemo.java file to demonstrate this (I'll commit the latest version to CVS shortly).
Right now, I am working on a new default color scheme to ensure that the series in the primary and secondary datasets get unique colors on the chart (including subplots in combined charts) and, of course, in the legend. I have something almost working now, but it needs tidying up.
Regards,
DG
Thanks for your post! The dual axis code is coming along nicely, but it has required some fairly low level changes to the code so it will take a bit of time to straighten out some of the quirks it has introduced.
There is a good reason for requiring a second dataset to plot against the additional axis. The dataset interfaces should not specify anything about how data is presented, only the structure and values of the data. So to add a method or methods that tell you which axis a series should be plotted against would be going against that principle. So, instead, there is now a 'secondary' dataset, and all the data in that dataset gets plotted against the secondary axis.
There is also an optional secondary renderer, which gives you the opportunity to change the presentation of the data that is plotted against the secondary axis. I've revised the PriceVolumeDemo.java file to demonstrate this (I'll commit the latest version to CVS shortly).
Right now, I am working on a new default color scheme to ensure that the series in the primary and secondary datasets get unique colors on the chart (including subplots in combined charts) and, of course, in the legend. I have something almost working now, but it needs tidying up.
Regards,
DG
Re: Multiple y axis--Thanks (and dataset question)!
Thanks David,
I appreciate the explanation and look forward to the next things to come!
Enjoy the day!
Stacey
I appreciate the explanation and look forward to the next things to come!
Enjoy the day!
Stacey
Re: Multiple y axis--Thanks (and dataset question)!
Does anyone know if this dual axis chart will allow for different dataset types? Right now, a combined dataset will take 2 SeriesDatasets, but this isn't really true, as it seems they must be XYDatasets as well. For example passing a GanttSeriesCollection doesn't work even though it is a SeriesDataset.
So what I want to be able to do is take a gantt chart with a horizontal date axis (category set) and overlay a line chart which is an XY set, but also has a horizontal date axis, to show CPU usage against process runtimes. These have common axises (sp?) but the current interfaces don't allow for them to actually be mixed.
thanks,
So what I want to be able to do is take a gantt chart with a horizontal date axis (category set) and overlay a line chart which is an XY set, but also has a horizontal date axis, to show CPU usage against process runtimes. These have common axises (sp?) but the current interfaces don't allow for them to actually be mixed.
thanks,
Re: Multiple y axis--Thanks (and dataset question)!
Hi Bryan,
The new dual axis code doesn't let you mix a CategoryDataset with an XYDataset...I'm not sure that there is a sensible way to do that.
Regards,
DG
The new dual axis code doesn't let you mix a CategoryDataset with an XYDataset...I'm not sure that there is a sensible way to do that.
Regards,
DG
Re: Multiple y axis--Thanks (and dataset question)!
I'm not sure the package name, but I think it's called SRGraph, which was used in some C++/Windows app that I have been working with to convert to a web version of the same functionality. Anyway, it has what I can only assume is an XY set overlayed on a category set. The XY set is % over time and the categories are process schedules (gantt series). So it was my assumption that the one common axis should be enough to make it work.
I would gladly try to do this stuff myself, but I'm so busy with other work and it would take me a lot of time to get up to speed with the existing chart code.
Thanks for the info,
I would gladly try to do this stuff myself, but I'm so busy with other work and it would take me a lot of time to get up to speed with the existing chart code.
Thanks for the info,
Multiple y-axis charts
I need to plot timesieries charts with multiple Y-axis ( 3-4 different type like flow, rainfall, humidity etc). Wanted to know if this functionality is supported in JFreeChart.
thanks,
Lokendra
thanks,
Lokendra