*** WIP WIP *** woks now for live and havg

This commit is contained in:
rxf
2023-03-27 09:55:55 +02:00
parent 9acf053b18
commit 1cdf03b064
4 changed files with 43 additions and 239 deletions
+15
View File
@@ -0,0 +1,15 @@
import {logerror} from "./logit.js";
import * as utils from "./chart_utilities.js";
export async function showChart(params, typ, container) {
const url = `/chart/getsensordata?&sensorid=${params.sid}&data=${typ}`
let ret = await fetch(url)
.catch(e => {
logerror(e)
});
let erg = await ret.json()
let chr = Highcharts.chart(container, erg.options, function (chart) {
utils.addSensorID2chart(chart, {sid: erg.params.sensorid, indoor: erg.params.indoor}, document.getElementById(container).offsetWidth)
})
}