Learn SCADAvis.io
Everything you need to create powerful web visualizations
Everything you need to create powerful web visualizations
1. Include the API in the HEAD section of the HTML file
<script src="https://scadavis.io/synoptic2/synopticapi.js"></script>
2. Create a new Scadavis object and animate the graphic
scadavisInit({
svgurl: "https://raw.githubusercontent.com/riclolsen/displayfiles/master/helloworld.svg"
}).then( sv => {
sv.setValue("TAG1", Math.random()*100);
})
Create your own speedometer or use existing resources:
Using the SCADAvis.io Editor:
scadavisInit({
svgurl: "https://raw.githubusercontent.com/riclolsen/displayfiles/master/speedometer.svg"
}).then(sv => {
sv.enableMouse(true, true);
sv.setValue("TAG1", 0);
// update at each .25 seconds
setInterval( function() {
let v = Math.random()*10-2.5*sv.getValue("TAG1")/60 +sv.getValue("TAG1");
if ( v < 0 ) v = 0;
if (v > 120) v = 120;
sv.setValue("TAG1", v);
}, 250);
})
We're here to help you succeed with SCADAvis.io