I started using JFreeChart with the 0.8.0 release. We create horizontal and vertical combination charts to meet some of our needs. In the 0.8.x releases, I used the setInsets() method of the CombinationPlot class to increase the spacing between the combined plots.
In the 0.9.x release, the setInsets() method appears to no longer set the spacing between the plots. After looking at the code, I found a new property in CombinedXYPlot called "gap". It appears to do exactly what I need. Since there were no accessors for this property, I have added them.
I have provided the code for the accessors here. If they are beneficial and in line with the direction of JFreeChart, hopefully they can become part of the base code.
Accessors added to CombinedXYPlot.java
/**
* Sets the amount of space between subplots.
*
* @param The gap between subplots
*/
public void setGap( double gap )
{
this.gap = gap;
}
/**
* Returns the space between subplots.
*
* @return The gap
*/
public double getGap( )
{
return gap;
}
Thanks, David and team, for the continued great work on the product.
As a side question, if notes of this type are more appropriate for a different list, please let me know.
Gaps in Combination Charts
Re: Gaps in Combination Charts
Hi David,
Thanks for that, I'll add the code now before I forget! I might add a change notification on the set method, to make sure the chart is redrawn when required.
Posting here is fine, or you can subscribe to the developer mailing list on SourceForge if you want to.
Regards,
DG.
Thanks for that, I'll add the code now before I forget! I might add a change notification on the set method, to make sure the chart is redrawn when required.
Posting here is fine, or you can subscribe to the developer mailing list on SourceForge if you want to.
Regards,
DG.