Improve weather precipitation chart

Skylar Ittner 4 years ago
parent db450560ec
commit bd02acec33

@ -120,7 +120,8 @@ function loadWeather(reload) {
borderWidth: 0, borderWidth: 0,
spanGaps: true, spanGaps: true,
backgroundColor: "#03A9F4", backgroundColor: "#03A9F4",
borderColor: "#03A9F4" borderColor: "#03A9F4",
lineTension: 0.5
} }
] ]
}, },
@ -161,9 +162,10 @@ function loadWeather(reload) {
drawBorder: false drawBorder: false
}, },
ticks: { ticks: {
beginAtZero: true,
min: 0, min: 0,
max: Math.round(maxprecip), autoSkip: true,
stepSize: (Math.round(maxprecip) / 2), maxTicksLimit: 3,
callback: function (value, index, values) { callback: function (value, index, values) {
if (getStorage("units") == "metric") { if (getStorage("units") == "metric") {
return value + ' mm'; return value + ' mm';

@ -98,7 +98,7 @@
<div class="row margin-vertical"> <div class="row margin-vertical">
<div class="col-100"> <div class="col-100">
<canvas id="precipchart" width="300" height="50"></canvas> <canvas id="precipchart" width="300" height="60"></canvas>
</div> </div>
</div> </div>
</div> </div>

Loading…
Cancel
Save