Statistic Node

Statistics allow you to showcase an important number to your users.

Statistics can be rendered with arbitrary precision and include a prefix or suffix, such as for units.

Properties

Visible

PropstatisticNode.isVisible
Typeboolean
Default{{true}}

Whether or not this node is visible.

Enabled

PropstatisticNode.isEnabled
Typeboolean
Default{{true}}

Whether or not this node is enabled.

Tooltip

PropstatisticNode.tooltip
Typestring
Defaultundefined

The tooltip text to display when hovered or focused over this node.

Top

PropstatisticNode.top
Typestring
Default1

The position of the node from the top side of the grid (grid-row-start).

Left

PropstatisticNode.left
Typestring
Default1

The position of the node from the left side of the grid (grid-column-start).

Width

PropstatisticNode.width
Typestring
Default76px

The width of the node. When this node is in a grid layout, this should be done using unitless grid column units (specifying 4 will become grid-column-end: span 4). When this node is in a stack layout, the width must be specified using CSS units (e.g. 100px or 100%).

Min Width

PropstatisticNode.minWidth
Typestring
Defaultnone

The minimum width of the node. When this node is in a grid layout, this property is ignored.

Max Width

PropstatisticNode.maxWidth
Typestring
Defaultnone

The maximum width of the node. When this node is in a grid layout, this property is ignored.

Height

PropstatisticNode.height
Typestring
Default100px

The height of the node. When this node is in a grid layout, this should be done using unitless grid row units (specifying 4 will become grid-row-end: span 4). When this node is in a stack layout, the height must be specified using CSS units (e.g. 100px or 100%).

Min Height

PropstatisticNode.minHeight
Typestring
Defaultnone

The minimum height of the node. When this node is in a grid layout, this property is ignored.

Max Height

PropstatisticNode.maxHeight
Typestring
Defaultnone

The minimum height of the node. When this node is in a grid layout, this property is ignored.

Overflow

PropstatisticNode.overflow
TypeOverflow ('auto' | 'visible' | 'hidden' | 'scroll')
Defaultauto

The strategy used to handle overflow in the horizontal and vertical axes for content that is larger than its container.

Overflow X

PropstatisticNode.overflowX
TypeOverflow ('auto' | 'visible' | 'hidden' | 'scroll')
Defaultauto

The strategy used to handle overflow in the horizontal axis for content that is larger than its container.

Overflow Y

PropstatisticNode.overflowY
TypeOverflow ('auto' | 'visible' | 'hidden' | 'scroll')
Defaultauto

The strategy used to handle overflow in the vertical axis for content that is larger than its container.

Custom Styles

PropstatisticNode.styles
Typestring
Defaultelement.styles { }

Custom CSS styles to be applied to the node. Use element.styles to refer to the current node.

Label

PropstatisticNode.label
Typestring
DefaultEnter a label

The label for the statistic, to be displayed alongside it.

Value

PropstatisticNode.value
Typenumber
Default0

The value of the statistic to display without units.

Precision

PropstatisticNode.precision
Typenumber
Default2

The precision to display the statistic at in terms of number of significant figures after the decimal point.

Rounding

PropstatisticNode.rounding
TypeRounding ('floor' | 'ceil' | 'round' | 'trunc')
Defaultround

The rounding behavior of the statistic value.

Prefix

PropstatisticNode.prefix
Typestring
Defaultundefined

The text to display before the statistic.

Suffix

PropstatisticNode.suffix
Typestring
Defaultundefined

The text to display after the statistic. Useful for units.