Module

columns

Classes

Column

Methods

# static buildColumnGroups(columnGroups, columnInfo) → {Array.<ColumnGroup>}

Check and prepare column group information

Parameters:
Name Type Description
columnGroups Array.<ColumnGroup>

information about column groups, empty array if not specified

columnInfo Array.<Column>

information about columns, to crosscheck

View Source columns.js, line 347

  • column groups with defaults filled in, if necessary
Array.<ColumnGroup>

# static createColumns(data, columnInfo, scaleColumn, colorByRank)

Assemble all column information needed for drawing

Parameters:
Name Type Description
data RowData

dataset

columnInfo Array.<module:columns~ColumnInfo>

properties of the columns for drawing, which will by modified in place

scaleColumn boolean

whether to min-max scale data for column, default for all columns

colorByRank boolean

whether to color by rank instead of by value, default for all columns

View Source columns.js, line 311

# inner isNumeric(str) → {boolean}

Test if a value is a number, including strings that can be coerced to a number.

Parameters:
Name Type Description
str *

value to test

View Source columns.js, line 396

  • if the value is a number
boolean

Type Definitions

Object

# ColumnGroup

Information about a group of columns for display. Creating multiple levels of groups is possible by specifying level1, level2, etc. with increasing numbers. The columns are not sorted by funkyheatmapjs, so the columns should have the groups on the adjacent positions.

Properties:
Name Type Description
group string

name of the group, must correspond to the group field in ColumnInfo

level1 string

name of the first level of the grouping. If not specified, derived from the group field

level2 string

name of the second level of the grouping, if necessary

level… string

further levels of the grouping are possible

palette string

name of the palette to use for coloring the background of the group, the middle of the palette is used

View Source columns.js, line 39

Object

# ColumnInfo

Information about a dataframe column and how to display it.

Properties:
Name Type Description
id string

column id in the dataset. Required

name string

name of the column to display above the column

group string

name of the group the column belongs to

geom string

type of visualization to display the column data. Default is funkyrect for numerical data, and text for categorical data. See geoms for available options

palette string

name of the palette to use for coloring the column. Must be defined in PaletteMapping or be a default palette (see defaultPalettes)

id_size string

id of the column that will determine the size for display

id_color string

id of the column that will determine the color for display

colorByRank boolean

whether to color by rank per column instead of by value

scaleColumn boolean

whether to scale the column data to [0, 1]

label string

id of the column that has the values to display as labels over the geoms

id_label string

synonym for label

id_hover_text string

id of the column that has the values to display as hover text

width number

width of the column, only used for bar and image geoms

options Object

additional options for the column

palette string

synonym for palette

width number

synonym for width

drawGuide boolean

whether to draw a guide at maximum for the bar geom column

draw_outline boolean

synonym for options.drawGuide

align 'left' | 'center' | 'right'

alignment of the text for text geom

fontSize number

font size for the text geom

View Source columns.js, line 8