Margin is a mixin that provides margin utility functions for both the Row Chart and Coordinate Grid Charts.
- Source:
Methods
-
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 | dc.marginMixin
Example
var leftMargin = chart.margins().left; // 30 by default chart.margins().left = 50; leftMargin = chart.margins().left; // now 50