diff --git a/index.html b/index.html
index efbe79c..f6a16ef 100644
--- a/index.html
+++ b/index.html
@@ -157,7 +157,7 @@
Fed Data Collection
ctx.font = `${fontSize}px ${fontStyle}`;
ctx.fillStyle = fontColor;
ctx.textAlign = 'right';
- ctx.fillText(label, chart.width - 10, 15);
+ ctx.fillText(label, chart.width - 10, 10);
ctx.restore();
}
};
@@ -297,6 +297,7 @@ Fed Data Collection
},
y: {
beginAtZero: true,
+ min: 0, // Ensure y-axis starts at 0
ticks: {
color: isDark ? '#ffffff' : '#333333'
},
@@ -315,7 +316,12 @@ Fed Data Collection
callbacks: {
title: function(context) {
const date = context[0].label;
- return luxon.DateTime.fromISO(date).toFormat('dd MMM yyyy');
+ const dt = luxon.DateTime.fromISO(date);
+ if (dt.isValid) {
+ return dt.toFormat('dd MMM yyyy');
+ } else {
+ return date; // Fallback to original label if invalid
+ }
}
}
},