I have a requirement to have two versions of the same chart stacked one above the other. I need the chart and plot sizes to be exactly the same. But I don't want the Y-Axis labels to show up on the second graph. The problem with this is that if I hide the axis label in the second chart, the plot area becomes larger. So is there a way for me to use the space for the Axis label but not display the label ?
Thanks
Two chart with the same size
Re: Two chart with the same size
Here are two methods you could try:
1. Create a subclass for XYPlot and override the calculateRangeAxisSpace method or create a subclass of NumberAxis and override the reserveSpace method.
2. Change the paint for the axis, ticks, label, etc. to the background color so they are still there but not seen.
1. Create a subclass for XYPlot and override the calculateRangeAxisSpace method or create a subclass of NumberAxis and override the reserveSpace method.
2. Change the paint for the axis, ticks, label, etc. to the background color so they are still there but not seen.