Enhance product card chart colors for better visibility (#2794)

* Enhance product card chart colors for better visibility

* Code style

---------

Co-authored-by: Bernd Bestel <bernd@berrnd.de>
This commit is contained in:
DeepCoreSystem
2025-08-15 16:55:50 +02:00
committed by GitHub
parent c8ee47f935
commit 31185beac5

View File

@@ -165,11 +165,16 @@ Grocy.Components.ProductCard.Refresh = function(productId)
{ {
if (key != "_TrendlineDataset") if (key != "_TrendlineDataset")
{ {
var color = "HSL(" + (129 * chart.datasets.length) + ",100%,50%)";
chart.datasets.push({ chart.datasets.push({
data: datasets[key], data: datasets[key],
label: key,
fill: false, fill: false,
borderColor: "HSL(" + (129 * chart.datasets.length) + ",100%,50%)", borderColor: color,
label: key pointBackgroundColor: color,
pointBorderColor: color,
pointHoverBackgroundColor: color
}); });
} }
else else