Class

FunkyHeatmap

FunkyHeatmap(data, columnInfo, columnGroups, rowInfo, rowGroups, palettes, legends, positionArgs, options, svg)

Heatmap class responsible for rendering the heatmap and handling user interactions. Takes preprocessed user data and stores it, along with the configuration options

Constructor

# new FunkyHeatmap(data, columnInfo, columnGroups, rowInfo, rowGroups, palettes, legends, positionArgs, options, svg)

Calls calculateOptions to pre-calculate some derived values.

Parameters:
Name Type Description
data RowData

data to be visualized

columnInfo Array.<module:columns.Column>

information about columns

columnGroups Array.<module:columns~ColumnGroup>

column groups

rowInfo Array.<RowInfo>

information about rows

rowGroups Array.<RowGroup>

row groups

palettes module:palettes~PaletteMapping

palettes used in the heatmap

legends Array.<module:legends~LegendInfo>

legends to be displayed

positionArgs PositionOptions

position arguments

options HeatmapOptions

heatmap options

svg SVGElement

SVG element to render the heatmap in

Properties:
Name Type Description
positionArgs PositionArgs
options HeatmapOptions
svg SVGElement

SVG element to render the heatmap in

data RowData

data to be visualized

columnInfo Array.<module:columns.Column>

information about columns

columnGroups Map.<string, module:columns~ColumnGroup>

column groups

rowInfo Array.<RowInfo>

information about rows

rowGroups Map.<string, module:columns~ColumnGroup>

row groups

palettes module:palettes~PaletteMapping

palettes used in the heatmap

legends Array.<module:legends~LegendInfo>

legends to be displayed

View Source main.js, line 204

Methods

# protected calculateOptions()

Determines if we render row groups and in which order.

View Source main.js, line 251

# protected hideTooltip()

View Source main.js, line 930

# protected indicateSort()

Draws an arrow indicating the sort order near the corresponding column.

View Source main.js, line 1021

# listen()

Adds event listeners to the SVG element to show and hide the tooltip.

View Source main.js, line 1083

# protected onColumnClick()

Event handler for column click to sort the data and rerender the heatmap.

View Source main.js, line 990

# protected onMouseMove()

Event handler for mouse move to trigger showing the tooltip.

View Source main.js, line 970

# render()

Renders the heatmap, calling the necessary functions in order.

View Source main.js, line 1052

# protected renderData()

Renders data column by column.

View Source main.js, line 305

# protected renderHeader()

Renders column labels and groups.

View Source main.js, line 464

# protected renderLegends()

Renders the footer with legends.

View Source main.js, line 643

# protected renderStripedRows()

Renders the heatmap's striped background.

View Source main.js, line 278

# protected showTooltip()

View Source main.js, line 939