minor changes and fixes
This commit is contained in:
parent
9c619a9538
commit
1102c8f5b0
1 changed files with 6 additions and 3 deletions
|
@ -142,8 +142,11 @@ 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>'
|
||||||
break
|
|
||||||
|
|
||||||
|
//thisBody.innerHTML = '<svg viewBox="0 0 56 18"><text x="0" y="15">Fit Meeeeeeeeeeee</text></svg>'
|
||||||
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
firstRow.appendChild(thisWidget)
|
firstRow.appendChild(thisWidget)
|
||||||
|
@ -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>"
|
||||||
|
|
Loading…
Reference in a new issue