Multiple y axis--Thanks (and dataset question)!

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

Multiple y axis--Thanks (and dataset question)!

Post by Stacey » Fri Nov 22, 2002 6:03 pm

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

Dave Gilbert

Re: Multiple y axis--Thanks (and dataset question)!

Post by Dave Gilbert » Fri Nov 22, 2002 6:41 pm

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

Stacey

Re: Multiple y axis--Thanks (and dataset question)!

Post by Stacey » Fri Nov 22, 2002 7:38 pm

Thanks David,

I appreciate the explanation and look forward to the next things to come!
Enjoy the day!

Stacey

Bryan Sampieri

Re: Multiple y axis--Thanks (and dataset question)!

Post by Bryan Sampieri » Thu Dec 12, 2002 1:19 am

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,

David Gilbert

Re: Multiple y axis--Thanks (and dataset question)!

Post by David Gilbert » Fri Dec 13, 2002 1:10 am

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

Bryan Sampieri

Re: Multiple y axis--Thanks (and dataset question)!

Post by Bryan Sampieri » Fri Dec 13, 2002 1:30 am

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,

Lokendra

Multiple y-axis charts

Post by Lokendra » Tue Dec 31, 2002 8:05 pm

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

Locked