Step Chart reusable API class that renders a
simple and configurable step chart.
(require("Step"))(_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 |
StepChartData | The data to attach and generate the chart |
- Source:
Requires
- module:d3-array,
Methods
-
module:Step(_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 _dataStepChartData The data to attach and generate the chart - Source:
-
<static> exportChart()
-
Chart exported to png and a download action is fired
- Source:
-
<static> exportChart()
-
Chart exported to png and a download action is fired
- Source:
-
<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 Step Chart module to chain calls- Type
- height | 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 Step Chart module to chain calls- Type
- margin | module
-
<static> numOfVerticalTicks(_x)
-
Gets or Sets the number of vertical ticks on the chart
Parameters:
Name Type Description _xnumber Desired width for the graph - Source:
Returns:
Current height or Step Chart module to chain calls- Type
- height | 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 step Chart module to chain calls- Type
- width | module
-
<static> xAxisLabel(_x)
-
Gets or Sets the text of the xAxisLabel on the chart
Parameters:
Name Type Description _xtext Desired text for the label - Source:
Returns:
label or Step Chart module to chain calls- Type
- text | module
-
<static> xAxisLabelOffset(_x)
-
Gets or Sets the offset of the xAxisLabel on the chart
Parameters:
Name Type Description _xinteger Desired offset for the label - Source:
Returns:
label or Step Chart module to chain calls- Type
- integer | module
-
<static> yAxisLabel(_x)
-
Gets or Sets the text of the yAxisLabel on the chart
Parameters:
Name Type Description _xtext Desired text for the label - Source:
Returns:
label or Step Chart module to chain calls- Type
- text | module
-
<static> yAxisLabelOffset(_x)
-
Gets or Sets the offset of the yAxisLabel on the chart
Parameters:
Name Type Description _xinteger Desired offset for the label - Source:
Returns:
label or Step Chart module to chain calls- Type
- integer | module