Tag Archive for: line chart

Responsive Time Series with JavaScript and Plotly

This is a basic but really useful (less is more) example of how to use Plotly to show a measure varying over time (live). You can resize the window here or on JSFiddle to check how it fits to the render area.

Add extra info to samples’ tooltip

Starting from our JSON with an array of samples, we are going to set the names of each sample in its tooltip, respectively.

Create new samples between samples

We are going to use Chartjs to plot our samples (values over time) in a Line Chart but before we are going to double our samples. To create each new sample we take the date (x) of the next element and the value (y) of the previous one.