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,7 +142,10 @@ class BlueWeatherDashboard {
case "text": case "text":
// the widget is pure text // the widget is pure text
thisWidget.classList.add("text-center") thisWidget.classList.add("text-center")
thisBody.innerHTML = '<h5 class="card-title">' + latestVal.measvalue + valueType.valueunit + '</h5>' 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 break
} }
@ -260,7 +263,7 @@ class BlueWeatherDashboard {
chartData.data.push({ x: vals[i]["timestamp"], y: vals[i]["measvalue"] }) 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 }) 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>" mainContent.innerHTML = "<canvas class=\"my-4 w-100\" id=\"myChart\"></canvas>"