*** WIP WIP *** woks now for live and havg
This commit is contained in:
@@ -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)
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user