Compare commits

..

4 Commits

Author SHA1 Message Date
Matt Walsh
872162080d 6.4.3 2026-02-16 20:40:25 -06:00
Matt Walsh
69d2b0f40b more robust backfilling of current weather properties close #177 2026-02-16 20:40:13 -06:00
Matt Walsh
37193112a7 6.4.2 2026-01-22 22:12:38 -06:00
Matt Walsh
0d9c445919 Fix hourly graph y axis labels close #176 2026-01-22 22:12:32 -06:00
5 changed files with 6 additions and 5 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "ws4kp",
"version": "6.4.1",
"version": "6.4.3",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "ws4kp",
"version": "6.4.1",
"version": "6.4.3",
"license": "MIT",
"dependencies": {
"dotenv": "^17.0.1",

View File

@@ -1,6 +1,6 @@
{
"name": "ws4kp",
"version": "6.4.1",
"version": "6.4.3",
"description": "Welcome to the WeatherStar 4000+ project page!",
"main": "index.mjs",
"type": "module",

View File

@@ -324,7 +324,7 @@ const backfill = (data) => {
// backfill each property
Object.keys(sortedData[0].properties).forEach((key) => {
// qualify the key (must have value)
if (Object.hasOwn(sortedData[0].properties[key], 'value')) {
if (Object.hasOwn(sortedData[0].properties?.[key] ?? {}, 'value')) {
// backfill this property
result[key] = backfillProperty(sortedData, key);
} else {

View File

@@ -94,7 +94,7 @@ class HourlyGraph extends WeatherDisplay {
// calculate temperature scale for min and max of dewpoint and temperature
const minScale = Math.min(...this.data.dewpoint, ...this.data.temperature);
const maxScale = Math.max(...this.data.dewpoint, ...this.data.temperature);
const thirdScale = (minScale + maxScale) / 3;
const thirdScale = (maxScale - minScale) / 3;
const midScale1 = Math.round(minScale + thirdScale);
const midScale2 = Math.round(minScale + (thirdScale * 2));
const tempScale = calcScale(minScale, availableHeight - 10, maxScale, 10);

View File

@@ -133,6 +133,7 @@ const smallIcon = (link, _isNightTime) => {
case 'wind_few':
case 'wind_few-n':
case 'wind_':
return addPath('Wind.gif');
case 'wind_sct':