In the examples I've seen of combined charts, usually the two datasets will share the axis (don't know the plural form of axis). For instance, two stocks being compared against each other over a year, each have price values and each have date values corresponding to the year in question.
However, in my case I wish to compare stock prices from one year to the stock prices from some other year. If I do this by just making a combined chart with datasets from both 2001 and 2002, the 2001 data will appear on the LHS of the chart, and the 2002 data will be on the RHS. The reason being is, they don't share the same timeline. However, for sake of visual aid, I would like to show these two stock values on the same time line, in a sense just disregarding their "year" and comparing the two by day/month. Currently I achieve this by taking one of the datasets and iterating through it to change all the data value's year to match the other dataset's year (bleh).
Keep in mind I am super new to JFreeChart and charting in general for that matter! So this is probably a really easy thing to do.
Thanks,
Craig.
Combined charts not sharing an axis...
Re: Combined charts not sharing an axis...
Insert forum tumbleweed here:
@...@@@@....@@@@..@@
Anyone have an answer for me
Thanks,
Craig.
@...@@@@....@@@@..@@
Anyone have an answer for me

Thanks,
Craig.
Re: Combined charts not sharing an axis...
Unfortunately, there's nothing in JFreeChart to make this easy...but I would suggest writing a wrapper class for an arbitrary XYDataset called something like TranslatedXYDataset and have it add some constant to all the x-values. Or maybe a utility method to create a new dataset that has been translated this way.
Anyone else have any good ideas?
Regards,
DG.
Anyone else have any good ideas?
Regards,
DG.