Reusable Donut Chart API class that renders a
simple and configurable donut chart.
(require("Donut"))(_selection, _data)
This function creates the graph using the selection as container
Parameters:
| Name | Type | Description |
|---|---|---|
_selection |
D3Selection | A d3 selection that represents the container(s) where the chart(s) will be rendered |
_data |
DonutChartData | The data to attach and generate the chart |
- Source:
Requires
- module:d3-dispatch,
Methods
-
module:Donut(_selection, _data)
-
This function creates the graph using the selection as container
Parameters:
Name Type Description _selectionD3Selection A d3 selection that represents the container(s) where the chart(s) will be rendered _dataDonutChartData The data to attach and generate the chart - Source:
-
<static> colorSchema(_x)
-
Gets or Sets the colorSchema of the chart
Parameters:
Name Type Description _xArray.<String> Desired colorSchema for the graph - Source:
Returns:
Current colorSchema or Chart module to chain calls- Type
- colorSchema | module
-
<static> exportChart()
-
Chart exported to png and a download action is fired
- Source:
-
<static> externalRadius(_x)
-
Gets or Sets the externalRadius of the chart
Parameters:
Name Type Description _xNumber ExternalRadius number to get/set - Source:
Returns:
Current externalRadius or Donut Chart module to chain calls- Type
- Number | Module
-
<static> height(_x)
-
Gets or Sets the height of the chart
Parameters:
Name Type Description _xNumber Desired width for the graph - Source:
Returns:
Current height or Donut Chart module to chain calls- Type
- Number | Module
-
<static> internalRadius(_x)
-
Gets or Sets the internalRadius of the chart
Parameters:
Name Type Description _xNumber InternalRadius number to get/set - Source:
Returns:
Current internalRadius or Donut Chart module to chain calls- Type
- Number | Module
-
<static> margin(_x)
-
Gets or Sets the margin of the chart
Parameters:
Name Type Description _xObject Margin object to get/set - Source:
Returns:
Current margin or Donut Chart module to chain calls- Type
- Number | Module
-
<static> on()
-
Exposes an 'on' method that acts as a bridge with the event dispatcher We are going to expose this events: customMouseOver, customMouseMove and customMouseOut
- Source:
Returns:
Bar Chart- Type
- module
-
<static> width(_x)
-
Gets or Sets the width of the chart
Parameters:
Name Type Description _xNumber Desired width for the graph - Source:
Returns:
Current width or Donut Chart module to chain calls- Type
- Number | Module