diff --git a/ipmd/templates/ipmd/saddlegallmidgeform.html b/ipmd/templates/ipmd/saddlegallmidgeform.html index 977d77ab4de8913e04e551b864a1c81ab434ac40..6692467ee82e1486e91f55893e0cf0e3874a8dee 100644 --- a/ipmd/templates/ipmd/saddlegallmidgeform.html +++ b/ipmd/templates/ipmd/saddlegallmidgeform.html @@ -32,8 +32,8 @@ <select class="form-control" name="weatherStationId" id="weatherStationId"></select> </div> <button class="btn btn-primary" type="button" onclick="submitData();">Submit</button> - <div> - <canvas id="resultChart"></canvas> + <div style="aspect-ratio: 2;"> + <canvas id="resultChart""></canvas> </div> <div id="weatherData" class="table-responsive"> </div> @@ -50,6 +50,7 @@ // Page globals var modelMetaData = undefined; var weatherDatasource = undefined; + var weatherDatasources = undefined; var editor = undefined; const selectList = document.getElementById("weatherStationId"); @@ -73,6 +74,8 @@ //console.info("Adding weather stations"); // Pull weather stations from web service, render list weatherDatasource = await getWeatherDatasource("no.nibio.lmt"); + weatherDatasources = await getWeatherDatasources(); + console.info(weatherDatasources); stationList = await getWeatherStationList(weatherDatasource); stationList.sort((a, b) => { return (a.name < b.name) ? -1 : (a.name > b.name) ? 1 : 0; @@ -160,13 +163,14 @@ new Chart(ctx, { type: "line", options: { + responsive: true, scales: { x: { type: "time", time: { //unit: "day", diplayFormats: { - day: "YYYY-MM-DD" // This doesn't seem to have any effect + day: "YYYY-MM-DD" // This doesn't seem to have any effect. Why?? } } }