Added graph
This commit is contained in:
@@ -24,8 +24,10 @@ class GaugeGroup {
|
||||
</div>
|
||||
</div>
|
||||
`).join('')}
|
||||
<div id="graph${nodeId}></div>
|
||||
</div>
|
||||
<div class="plotly-container">
|
||||
<div id="liveGraph${this.nodeId}" ></div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
// Append the new div to the body
|
||||
|
@@ -27,6 +27,7 @@
|
||||
|
||||
|
||||
<body>
|
||||
<script src="https://cdn.plot.ly/plotly-latest.min.js" charset="utf-8"></script>
|
||||
<script src="GaugGroup.js"></script>
|
||||
<script src="main.js"></script>
|
||||
<script src="liveGraph.js"></script>
|
||||
|
@@ -98,9 +98,17 @@ async function nodeAdressHandler(node, dataTypes) {
|
||||
|
||||
let gaugeGroup = new GaugeGroup(nodeName, nodeLocation, dataTypes.length, maxGaugeValues, dataTypes);
|
||||
sensorData[node] = gaugeGroup;
|
||||
gaugeGroup.graph = new liveGraph(nodeName);
|
||||
sensorData[node] = gaugeGroup;
|
||||
gaugeGroup.graph.makeGraph();
|
||||
sensorData[node] = gaugeGroup;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function getNodeInfo(node){
|
||||
return fetch("http://145.92.8.114/getNodeInfo?macAdress=" + node)
|
||||
.then(response => {
|
||||
|
Reference in New Issue
Block a user