/**
* Returns the flag that controls whether or not the x-position for each
* data item is offset within the category according to the series.
*
* @return A boolean.
*
* @see #setUseSeriesOffset(boolean)
*/
/**
* Returns the flag that controls whether or not the x-position for each
* data item is offset within the category according to the series.
*
* @return A boolean.
*
* @see #setUseSeriesOffset(boolean)
*
* @since 1.0.7
*/
public boolean getUseSeriesOffset() {
return this.useSeriesOffset;
}
/**
* Sets the flag that controls whether or not the x-position for each
* data item is offset within its category according to the series, and
* sends a {@link RendererChangeEvent} to all registered listeners.
*
* @param offset the offset.
*
* @see #getUseSeriesOffset()
*/
/**
* Sets the flag that controls whether or not the x-position for each
* data item is offset within its category according to the series, and
* sends a {@link RendererChangeEvent} to all registered listeners.
*
* @param offset the offset.
*
* @see #getUseSeriesOffset()
*
* @since 1.0.7
*/
public void setUseSeriesOffset(boolean offset) {
this.useSeriesOffset = offset;
fireChangeEvent();
}
/**
* Returns the item margin, which is the gap between items within a
* category (expressed as a percentage of the overall category width).
* This can be used to match the offset alignment with the bars drawn by
* a {@link BarRenderer}).
*
* @return The item margin.
*
* @see #setItemMargin(double)
* @see #getUseSeriesOffset()
*/
/**
* Returns the item margin, which is the gap between items within a
* category (expressed as a percentage of the overall category width).
* This can be used to match the offset alignment with the bars drawn by
* a {@link BarRenderer}).
*
* @return The item margin.
*
* @see #setItemMargin(double)
* @see #getUseSeriesOffset()
*
* @since 1.0.7
*/
public double getItemMargin() {
return this.itemMargin;
}
/**
* Sets the item margin, which is the gap between items within a category
* (expressed as a percentage of the overall category width), and sends
* a {@link RendererChangeEvent} to all registered listeners.
*
* @param margin the margin (0.0 <= margin < 1.0).
*
* @see #getItemMargin()
* @see #getUseSeriesOffset()
*/
/**
* Sets the item margin, which is the gap between items within a category
* (expressed as a percentage of the overall category width), and sends
* a {@link RendererChangeEvent} to all registered listeners.
*
* @param margin the margin (0.0 <= margin < 1.0).
*
* @see #getItemMargin()
* @see #getUseSeriesOffset()
*
* @since 1.0.7
*/
public void setItemMargin(double margin) {
if (margin < 0.0 || margin >= 1.0) {
throw new IllegalArgumentException("Requires 0.0 <= margin < 1.0.");
}
this.itemMargin = margin;
fireChangeEvent();
}
|