Skip to content

Matrix Renderer

Tobias Paczian edited this page Mar 29, 2018 · 1 revision

image

Renders a matrix of data in a table. The values are highlighted in a colored circle with the relative abundance determining the opacity.

options

  • target (HTML Container Element) - Element to render the matrix table in.
  • data (ARRAY of ARRAY of NUMBER) - an object containing { data: array of array of abundances, rows: array of row headers, columns: array of column headers }
  • ** minOpacity** (FLOAT) - minimum opacity of a data cell circle (between 0 and 1), default is 0.1
  • callback (FUNCTION) - function called when a cell is clicked. Will return the following structure: { rendererIndex, rowIndex, colIndex, cellValue, relativeCellValue, colName, rowName, cell, circle }
  • circleColor (CSS color value) - base color of the circles (before opacity is applied), default is purple
  • rowColors (HASH of INT -> CSS color value) - hash of row index pointing to a CSS color value, determining the base color of the circles in that row. Overwrites the default color.
  • colColors (HASH of INT -> CSS color value) - hash of column index pointing to a CSS color value, determining the base color of the circles in that column. Overwrites the default color and row color.
  • dataFontSize (CSS font size) - determines the font size of the values in the cells, default is 10px
  • rowFontSize (CSS font size) - determines the font size of the row headers, default is inherit
  • colFontSize (CSS font size) - determines the font size of the column headers, default is inherit
  • circleSize (INT) - diameter of the data circles in pixel, default is 30
  • colHeaderHeight (INT) - height of the column header row in pixel, default is 100

Clone this wiki locally