This commit is contained in:
MuslemRahimi 2025-02-23 13:32:31 +01:00
parent 9397b28c35
commit e116a9b24d

View File

@ -420,7 +420,7 @@
animation: false, animation: false,
}, },
title: { title: {
text: `<div class="grid grid-cols-2 w-[200px] sm:w-[500px] -mb-3.5 text-xs font-[501] text-gray-300"> text: `<div class="grid grid-cols-2 w-[200px] sm:w-[500px] -mb-3.5 text-xs font-[501] text-gray-400">
<h3 class="text-left">${$screenWidth && $screenWidth < 640 ? "Past Year" : "Past 12 Months"}</h3> <h3 class="text-left">${$screenWidth && $screenWidth < 640 ? "Past Year" : "Past 12 Months"}</h3>
<h3 class="text-right">${$screenWidth && $screenWidth < 640 ? "Next Year" : "12 Month Forecast"}</h3> <h3 class="text-right">${$screenWidth && $screenWidth < 640 ? "Next Year" : "12 Month Forecast"}</h3>
</div>`, </div>`,
@ -435,19 +435,17 @@
gridLineWidth: 1, gridLineWidth: 1,
gridLineColor: "#111827", gridLineColor: "#111827",
type: "datetime", type: "datetime",
endOnTick: false,
labels: { labels: {
style: { style: {
color: "#fff", color: "#fff",
}, },
formatter: function () { formatter: function () {
const date = new Date(this.value); const date = new Date(this.value);
const isMobile = $screenWidth < 640; return date.toLocaleDateString("en-US", {
return isMobile month: "short",
? date.toLocaleDateString("en-US", { month: "short" }) year: "numeric",
: date.toLocaleDateString("en-US", { });
month: "short",
year: "numeric",
});
}, },
}, },
}, },