D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
linyuyoung
Full window
Github gist
Liquid Flow for project TBL
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title></title> <script src="https://d3js.org/d3.v3.min.js" language="JavaScript"></script> <script src="liquidFillGauge.js" language="JavaScript"></script> <style> .liquidFillGaugeText { font-family: Helvetica; font-weight: bold;} </style> </head> <body> <svg id="fillgauge1" width="30%" height="300" ></svg> <svg id="fillgauge2" width="30%" height="300" ></svg> <svg id="fillgauge3" width="30%" height="300" ></svg> <script language="JavaScript"> var gauge1 = loadLiquidFillGauge("fillgauge1", 99); var config1 = liquidFillGaugeDefaultSettings(); config1.waveColor = "#661e00"; var gauge2= loadLiquidFillGauge("fillgauge2", 3.9, config1); var config2 = liquidFillGaugeDefaultSettings(); config2.waveColor = "#effbff"; var gauge3 = loadLiquidFillGauge("fillgauge3", 25, config2); var config3 = liquidFillGaugeDefaultSettings(); config3.waveAnimate = false; config3.waveOffset = 0.25; config3.valueCountUp = false; function NewValue(){ if(Math.random() > .5){ return Math.round(Math.random()*100); } else { return (Math.random()*100).toFixed(1); } } </script> </body> </html>
Modified
http://d3js.org/d3.v3.min.js
to a secure url
https://d3js.org/d3.v3.min.js