API: Stacked-area

Stacked Area Chart reusable API module that allows us rendering a multi area and configurable chart.

(require("Stacked-area"))(_selection, _data)

This function creates the graph using the selection and data provided
Parameters:
Name Type Description
_selection D3Selection A d3 selection that represents the container(s) where the chart(s) will be rendered
_data areaChartData The data to attach and generate the chart
Source:

Requires

  • module:d3-array,

Methods


module:Stacked-area(_selection, _data)

This function creates the graph using the selection and data provided
Parameters:
Name Type Description
_selection D3Selection A d3 selection that represents the container(s) where the chart(s) will be rendered
_data areaChartData The data to attach and generate the chart
Source:

<static> areaOpacity(_x)

Gets or Sets the opacity of the stacked areas in the chart (all of them will have the same opacity)
Parameters:
Name Type Description
_x Object Opacity to get/set
Source:
Returns:
Current opacity or Area Chart module to chain calls
Type
opacity | module

<static> aspectRatio(_x)

Gets or Sets the aspect ratio of the chart
Parameters:
Name Type Description
_x Number Desired aspect ratio for the graph
Source:
Returns:
Current aspect ratio or Area Chart module to chain calls
Type
Number | Module

<static> colorSchema(_x)

Gets or Sets the colorSchema of the chart
Parameters:
Name Type Description
_x Array.<String> Desired colorSchema for the graph
Source:
Returns:
Current colorSchema or Chart module to chain calls
Type
colorSchema | module

<static> dateLabel(_x)

Gets or Sets the dateLabel of the chart
Parameters:
Name Type Description
_x Number Desired dateLabel for the graph
Source:
Returns:
Current dateLabel or Chart module to chain calls
Type
dateLabel | module

<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 Area Chart module to chain calls
Type
height | module

<static> keyLabel(_x)

Gets or Sets the keyLabel of the chart
Parameters:
Name Type Description
_x Number Desired keyLabel for the graph
Source:
Returns:
Current keyLabel or Chart module to chain calls
Type
keyLabel | 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 Area 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> tooltipThreshold(_x)

Gets or Sets the tooltipThreshold of the chart
Parameters:
Name Type Description
_x Object Margin object to get/set
Source:
Returns:
Current tooltipThreshold or Area Chart module to chain calls
Type
tooltipThreshold | module

<static> valueLabel(_x)

Gets or Sets the valueLabel of the chart
Parameters:
Name Type Description
_x Number Desired valueLabel for the graph
Source:
Returns:
Current valueLabel or Chart module to chain calls
Type
valueLabel | 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 Area Chart module to chain calls
Type
width | module