minor changes and fixes

This commit is contained in:
Dorian Zedler 2019-07-14 18:51:43 +02:00
parent 9c619a9538
commit 1102c8f5b0

View file

@ -142,8 +142,11 @@ class BlueWeatherDashboard {
case "text":
// the widget is pure text
thisWidget.classList.add("text-center")
thisBody.innerHTML = '<h5 class="card-title">' + latestVal.measvalue + valueType.valueunit + '</h5>'
break
thisBody.innerHTML = '<h1 class="align-self-center mx-auto" style="font-size:10vw;margin-top: auto;margin-bottom: auto;">' + latestVal.measvalue + valueType.valueunit + '</h1>'
//thisBody.innerHTML = '<svg viewBox="0 0 56 18"><text x="0" y="15">Fit Meeeeeeeeeeee</text></svg>'
break
}
firstRow.appendChild(thisWidget)
@ -260,7 +263,7 @@ class BlueWeatherDashboard {
chartData.data.push({ x: vals[i]["timestamp"], y: vals[i]["measvalue"] })
}
Object.assign(chartData.datasets[0], JSON.parse(valueType.displayproperty))
Object.assign(chartData.datasets[0], JSON.parse(valueType.displayproperty)["chart"]["properties"])
Object.assign(chartData.datasets[0], { data: chartData.data, pointRadius: chartData.data.length > 500 ? 0 : 3 })
mainContent.innerHTML = "<canvas class=\"my-4 w-100\" id=\"myChart\"></canvas>"