API: Heatmap

Reusable Heatmap API module that renders a simple and configurable heatmap chart.

(require("Heatmap"))(_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 HeatmapData The data to attach and generate the chart
Source:

Requires

  • module:d3-array,

Methods


module:Heatmap(_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 HeatmapData The data to attach and generate the chart
Source:

<static> boxSize(_x)

Gets or Sets the boxSize of the chart
Parameters:
Name Type Default Description
_x Number 30 Desired boxSize for the heatmap boxes
Source:
Returns:
Current boxSize or Chart module to chain calls
Type
Number | module

<static> colorSchema(_x)

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

<static> exportChart(filename, title)

Chart exported to png and a download action is fired
Parameters:
Name Type Description
filename String File title for the resulting picture
title String Title to add at the top of the exported picture
Source:

<static> height(_x)

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

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