English 中文(简体)
DC.js - marginMixin
  • 时间:2024-12-22

DC.js - marginMixin


Previous Page Next Page  

marginMixin provides margin utipty functions for both the Row Chart and Coordinate Grid Charts. The hierarchy of the marginMixin is defined in the diagram below.

marginMixin

marginMixin provides a single method to set the margin for coordinated axis based charts.

margins( [margins])

Gets or sets the left, right, top and bottom margin of the chart. The default margin of the chart is as follows −

a. Right - 50
a. Left - 30
a. Top - 10
a. Bottom - 30

var rightMargin = chart.margins().right; // 50 by default
chart.margins().bottom = 60;
Advertisements