lPlot is a very fast and memory-efficienttime serieschart based onCanvas 2D; from a cold start it can create an interactive chart containing 150, 000 data points in 50 ms. In addition to fast initial render, the zooming and cursor performance is by far the best of any similar charting lib; at ~ 7 KB (min), it’s likely the smallest and fastest time series plotter that doesn’t make use of WebGL shaders or WASM, both of which have much higher startup cost and code size.
In order to stay lean, fast and focused the following features will not be added:
linkrel="stylesheet"href="src / uPlot.css">scriptsrc="dist / uPlot.iife.min.js">script>script>constdata=[ [1566453600,1566457260,1566460860,1566464460],//Unix timestamps[0.54, 0.15, 3.27, 7.51 ],//CPU[12.85, 13.21, 13.65, 14.01 ],//RAM[0.52, 1.25, 0.75, 3.62 ],//TCP Out];constopts={width:800,height:400,cursor:true,series:{x:{data:data [0],},y:[ { label:"CPU", data:data[1],scale:"%",value:V=>V.toFixed( (1) )"%",color:"red",width:2,dash:[10,5],},{label:"RAM",data:data [2],scale:"%",value:V=>V.toFixed( (1) )"%",color:"blue",},{label:"TCP Out",data:data [3],scale:"mb",value:V=>V.toFixed( (2) )"MB",color:"green",}],},Axes:{y:[ { scale:'%', values:(vals,space)=>vals.map(v=>v.toFixed(1)"%"), }, { side:3, scale:'mb', values:(vals,space)=>vals.map(v=>v.toFixed(2)"MB"), grid:null, }, ],},};letuplot=newuPlot(opts);document.body.appendChild(Uplot.root);script>
GIPHY App Key not set. Please check settings