|
@@ -140,6 +140,12 @@ export class UnitComponent implements OnInit, OnDestroy {
|
|
|
// if (event.checked.includes(sensorId.toString()))
|
|
// if (event.checked.includes(sensorId.toString()))
|
|
|
this.showVega[groupId] = true;
|
|
this.showVega[groupId] = true;
|
|
|
|
|
|
|
|
|
|
+ const box = document.getElementById('vega_container_' + groupId);
|
|
|
|
|
+ const boxWidth = box.getBoundingClientRect().width;
|
|
|
|
|
+ const boxHeight = box.getBoundingClientRect().height;
|
|
|
|
|
+
|
|
|
|
|
+ GraphLoader.setSize(boxWidth - 50, 300);
|
|
|
|
|
+
|
|
|
if (!this.selectedSensors.find(sensId => sensId.toString().slice(0, 5) === groupId)) { // if group of sensors is empty show empty graph
|
|
if (!this.selectedSensors.find(sensId => sensId.toString().slice(0, 5) === groupId)) { // if group of sensors is empty show empty graph
|
|
|
// GraphLoader.getAnalyticsGraph(null, null, null, sensorGroupElement);
|
|
// GraphLoader.getAnalyticsGraph(null, null, null, sensorGroupElement);
|
|
|
GraphLoader.getGraph(null, null, null, sensorGroupElement, null);
|
|
GraphLoader.getGraph(null, null, null, sensorGroupElement, null);
|