Skip to content

Smoothie Charts: smooooooth JavaScript charts for realtime streaming data

License

Notifications You must be signed in to change notification settings

joewalnes/smoothie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

e269d8b · Jan 8, 2023
Jan 8, 2023
Sep 12, 2017
Apr 20, 2018
Oct 30, 2017
May 2, 2017
Apr 20, 2018
Jul 18, 2022
Oct 30, 2017
Jul 16, 2022
Jan 8, 2023
Jan 8, 2023

Repository files navigation

npm version

Smoothie Charts is a really small charting library designed for live streaming data. I built it to reduce the headaches I was getting from watching charts jerkily updating every second.

See http://smoothiecharts.org


Getting Started


Example

Given a <canvas>:

<canvas id="chart" width="400" height="100"></canvas>

Create a time series and chart with code resembling:

// Create a time series
var series = new TimeSeries();

// Find the canvas
var canvas = document.getElementById('chart');

// Create the chart
var chart = new SmoothieChart();
chart.addTimeSeries(series, { strokeStyle: 'rgba(0, 255, 0, 1)' });
chart.streamTo(canvas, 500);

Then, add data to your time series and it will be displayed on the chart:

// Randomly add a data point every 500ms
setInterval(function() {
    series.append(Date.now(), Math.random() * 10000);
}, 500);

Questions

For help, use the Smoothie Charts Google Group.


License (MIT)