Skip to main content

chart

Display real-time data visualizations with line, bar, and pie charts.

Overview

The chart node displays real-time data visualizations on the dashboard. Supports line, bar, pie, and doughnut charts with automatic scaling, multiple series, and customizable appearance.

Line
Time Series
Bar
Comparisons
Pie
Distributions
Real
Time

Properties

Property Type Default Description
group string - Dashboard group to place chart
chartType string "line" line, bar, pie, doughnut, radar
xAxis string "time" X-axis type: time, category, linear
yMin number auto Minimum Y-axis value
yMax number auto Maximum Y-axis value
legend boolean true Show legend
interpolation string "linear" linear, step, bezier

Input Formats

Single Value

msg.payload = 42;
// Adds point to current series

Named Series

msg.topic = "Temperature";
msg.payload = 24.5;
// Adds to "Temperature" series

Array of Points

msg.payload = [
  { x: Date.now(), y: 25 },
  { x: Date.now() + 1000, y: 26 }
];

Multiple Series

msg.payload = [{
  "series": ["Temp", "Humidity"],
  "data": [[24], [65]]
}];

Chart Types

Line Chart

Best for time series data and trends

Bar Chart

Best for comparing categories

Pie Chart

Best for showing proportions

Radar Chart

Best for multivariate data

Example: Multi-Sensor Dashboard

Display temperature and humidity on the same chart.

// Function node: Format for chart
msg.payload = [{
    "series": ["Temperature", "Humidity"],
    "data": [
        [{ x: Date.now(), y: msg.payload.temperature }],
        [{ x: Date.now(), y: msg.payload.humidity }]
    ],
    "labels": [""]
}];

return msg;

// Chart node configuration:
{
    "chartType": "line",
    "xAxis": "time",
    "yMin": 0,
    "yMax": 100,
    "legend": true
}

Control Messages

Clear Chart

msg.payload = [];
// Clears all data from chart

Clear Single Series

msg.topic = "Temperature";
msg.payload = [];
// Clears only Temperature series

Related Nodes