Reference
Nodes
Components
Chart

Chart Component

Charts are a powerful and flexible way to visualize your data, letting Dynaboard do the heavy lifting.

Create a chart node and specify its data source (opens in a new tab). Your data can come from any other node, most commonly the output of a function node (e.g. {{function1.data}}). From there, the chart node has a handful of options to customize its look and feel.

Charts in Dynaboard are built on top of the incredible Plotly (opens in a new tab) charting library, used by many top data teams.

Supported Charts

  • Line charts (LINE)
  • Bar charts (BAR)
  • Scatter plots (SCATTER)

Properties

Visible

PropisVisible
Typeboolean
Defaulttrue

Whether or not this node is visible.

Enabled

PropisEnabled
Typeboolean
Defaulttrue

Whether or not this node is enabled.

Tooltip

Proptooltip
Typestring
Defaultundefined

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

Top

Proptop
Typenumber
Default1

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

Left

Propleft
Typenumber
Default1

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

Width

Propwidth
Typestring
Default650px

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 can be specified using CSS units (e.g. 100px or 100%), or be left unitless to be treated as flex-grow for the node.

Min Width

PropminWidth
Typestring
Defaultundefined

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

Max Width

PropmaxWidth
Typestring
Defaultundefined

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

Height

Propheight
Typestring
Default450px

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 can be specified using CSS units (e.g. 100px or 100%), or be left unitless to be treated as flex-grow for the node.

Min Height

PropminHeight
Typestring
Defaultundefined

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

Max Height

PropmaxHeight
Typestring
Defaultundefined

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

Overflow

Propoverflow
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

PropoverflowX
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

PropoverflowY
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

Propstyles
Typestring
Default::component { }

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

Object Fit

PropobjectFit
TypeObjectFit ('none' | 'contain' | 'cover' | 'fill' | 'scale-down')
Defaultcover

The strategy used to set how the content of a replaced element should be resized to fit its container.

Chart Title

Proptitle
Typestring
DefaultUser Growth

The title of the chart to be displayed on top of the chart.

Legend

PropallowLegend
Typeboolean
Defaultfalse

Whether or not to allow legend in the chart.

Legend Orientation

ProplegendOrientation
TypeLegendOrientations ('v' | 'h')
Defaultv

The orientation of the legend in the chart.

Legend Position

ProplegendPosition
TypeLegendPositions ('top' | 'bottom' | 'left' | 'right')
Defaulttop

The position of the legend in the chart.

Interactive

PropisInteractive
Typeboolean
Defaulttrue

Whether or not to be interactive with the chart.

Data Source

PropdataSource
Typeunknown
Default[ { x: 0, y1: 2, y2: 1 }, { x: 1, y1: 4, y2: 2 }, { x: 2, y1: 6, y2: 3 }, { x: 3, y1: 10, y2: 5 }, ]

The data source to use for the chart. Data sources should be an array of objects with a consistent set of keys. For example can represent a cartesian X/Y coordinate by having an array of objects with keys x and y.

Parent Chart Type

PropparentChartType
TypeParentChartTypes ('cartesian' | 'pie' | 'custom')
Defaultcartesian

The type of chart to be configured.

Bar Mode

PropbarMode
TypeBarModes ('group' | 'stack')
Defaultgroup

The mode of the bar chart.

Dimensions

Propdimensions
Typearray
Default[ { 'key': 'Untitled Dimension 1', 'id': '00000000-0000-0000-0000-000000000000', 'name': 'Untitled Dimension 1', 'side': 'left', 'yKey': 'y1', 'type': 'line', 'mode': 'lines+markers', 'lineShape': 'spline', 'markerColor': 'purple.500' } ]

The dimension configuration for the chart.

Dimension

Propdimensions[]
Typeobject
Defaultundefined

A set of data to represent on the chart

Key

Propdimensions[].key
Typestring
Defaultundefined

The key in the source data to represent on the X-axis

ID

Propdimensions[].id
Typestring
Defaultundefined

The ID of this dimension

Name

Propdimensions[].name
Typestring
Defaultundefined

The name of the dimension

Side

Propdimensions[].side
TypeYAxisSides ('left' | 'right')
Defaultundefined

Which side of the graph should the Y-Axis for this dimension appear

YKey

Propdimensions[].yKey
Typestring
Defaultundefined

The key in the source data to represent on the Y-axis

Type

Propdimensions[].type
TypeChartTypes ('bar' | 'line' | 'scatter' | 'none')
Defaultundefined

Which type of chart to use for this dimension

Mode

Propdimensions[].mode
TypeChartModes ('lines' | 'markers' | 'lines+markers')
Defaultundefined

How should the dimension be represented

LineShape

Propdimensions[].lineShape
TypeChartLineShapes ('linear' | 'spline')
Defaultundefined

The style of the line representing this dimension

MarkerColor

Propdimensions[].markerColor
Typestring
Defaultundefined

The color of this dimension on the chart

X Key

PropxKey
Typestring
Defaultx

The key to use from the data source to provide the X values of the chart.

Horizontal axis title

ProphorizontalAxisTitle
Typestring
DefaultDay

The title to add for the X axis of the chart.

Left vertical axis title

PropleftVerticalAxisTitle
Typestring
DefaultUsers

The title to add for the left Y axis of the chart.

Right vertical axis title

ProprightVerticalAxisTitle
Typestring
Defaultundefined

The title to add for the right Y axis of the chart.

Horizontal axis type

ProphorizontalAxisType
TypeChartAxisTypes ('-' | 'linear' | 'log' | 'date' | 'category' | 'multicategory')
Default-

The scale type to use for the X axis.

Left vertical axis type

PropleftVerticalAxisType
TypeChartAxisTypes ('-' | 'linear' | 'log' | 'date' | 'category' | 'multicategory')
Default-

The scale type to use for the left Y axis.

Right vertical axis type

ProprightVerticalAxisType
TypeChartAxisTypes ('-' | 'linear' | 'log' | 'date' | 'category' | 'multicategory')
Default-

The scale type to use for the right Y axis.

Background Color

PropbackgroundColor
Typestring
Defaultundefined

The background color of the component when instantiated.

Event Handlers

On Hover

HandlerchartNode.onHover

Called when the user hovers on the node. Use this event to trigger downstream actions when this node is hovered.

On Leave

HandlerchartNode.onLeave

Called when the user is not hovering over the node. Use this event to trigger downstream actions when this node is no longer hovered.