Gaps in Combination Charts

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

Gaps in Combination Charts

Post by David Basten » Tue Jun 18, 2002 7:07 pm

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.

David Gilbert

Re: Gaps in Combination Charts

Post by David Gilbert » Wed Jun 19, 2002 8:39 am

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.

Locked