phylocanvas-plugin-metadata
Display metadata blocks adjacent to tree leaves.
Usage
npm install phylocanvas phylocanvas-plugin-metadata
;; Phylocanvas; const tree = Phylocanvas tree;
Options
A list of available options:
active
: A boolean flag to show or hide the metadata blocks on the tree. The default value istrue
.showHeaders
: A boolean flag to show or hide header labels. The default value istrue
.showLabels
: A boolean flag to show or hide block labels. The default value istrue
.blockLength
: The length of each block is treated as:- the width of the block on
rectangular
anddiagonal
trees, - the height of the block on
hierarchical
trees, - the width of the block on
circular
andradial
trees.
- the width of the block on
blockSize
: The size of each block is treated as:- the height of the block on
rectangular
anddiagonal
trees, - the width of the block on
hierarchical
trees, - the height of the block on
circular
andradial
trees.
- the height of the block on
padding
: The padding between the metadata blocks. The default value is0
.columns
: An array of column names to be displayed on the tree. The default value is an empty array which displays all columns.propertyName
: The name of the property on the branch object which contains the metadata values. The default value is'data'
.headerAngle
: An angle (in degrees) to rotate the header labels. The default value is90
degrees.underlineHeaders
: A boolean flag to draw a line under header labels. The default value isfalse
.fillStyle
: A valid stroke style (https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillStyle) to be used when drawing. The default value is'black'
.strokeStyle
: A valid stroke style (https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/strokeStyle) to be used when drawing. The default value is'black'
.lineWidth
: The line width used for drawing lines under header labels. The default value is1
.font
: A valid CSS font value (https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/font) to be used for header and block labels. When anull
is set as font, the values oftree.textSize
andtree.font
will be used. The default value isnull
.