API: Step

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
_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:

<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
_x number Desired width for the graph
Source:
Returns:
Current height or Chart module to chain calls
Type
height | module

<static> margin(_x)

Gets or Sets the margin of the chart
Parameters:
Name Type Description
_x object Margin object to get/set
Source:
Returns:
Current margin or Chart module to chain calls
Type
margin | 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
_x number Desired width for the graph
Source:
Returns:
Current width or 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
_x text Desired text for the label
Source:
Returns:
label or 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
_x integer Desired offset for the label
Source:
Returns:
label or 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
_x text Desired text for the label
Source:
Returns:
label or 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
_x integer Desired offset for the label
Source:
Returns:
label or Chart module to chain calls
Type
integer | module

<static> yTicks(_x)

Gets or Sets the number of vertical ticks on the chart (Default is 6)
Parameters:
Name Type Description
_x Number Desired number of vertical ticks for the graph
Source:
Returns:
Current yTicks or Chart module to chain calls
Type
Number | module