// Plot data using series p.add(-1, `temp`); p.add(0.4, `humidty`);
Options can be specified to customise plot
constp = plot(`#parentDiv`, { capacity:100, // How many data points to store (default: 10) showYAxis:false, // Toggle whether y axis is shown (default: true) lineWidth:2, // Width of plot line (default: 2) yAxes: [`temp`], // Only show these y axes (by default all are shown) coalesce:true, // If true, sub-pixel data points are skipped, improving performance for dense plots at the expense of plot precision });
For all capacity values other than 0, a circular array is used to track data. Otherwise an array is used that will
grow infinitely.
By default, will attempt to use CSS variable --series[seriesName] for axis colours.
--series[name]-axis for titles. Eg --seriesX. For data added without a named series,
it will use --series and --series-axis.
Creates a simple horizontal data plot within a DIV.
Options can be specified to customise plot
For all
capacity
values other than0
, a circular array is used to track data. Otherwise an array is used that will grow infinitely.By default, will attempt to use CSS variable
--series[seriesName]
for axis colours.--series[name]-axis
for titles. Eg--seriesX
. For data added without a named series, it will use--series
and--series-axis
.