Mixin: MarginMixin

MarginMixin

Margin is a mixin that provides margin utility functions for both the Row Chart and Coordinate Grid Charts.

Source:

Methods


effectiveHeight()

Effective height of the chart excluding margins (in pixels).

Source:
Returns:
Type
number

effectiveWidth()

Effective width of the chart excluding margins (in pixels).

Source:
Returns:
Type
number

margins( [margins])

Get or set the margins for a particular coordinate grid chart instance. The margins is stored as an associative Javascript array.

Parameters:
Name Type Argument Default Description
margins Object <optional>
{top: 10, right: 50, bottom: 30, left: 30}
Source:
Returns:
Type
Object | MarginMixin
Example
var leftMargin = chart.margins().left; // 30 by default
chart.margins().left = 50;
leftMargin = chart.margins().left; // now 50