mirror of
https://github.com/grocy/grocy.git
synced 2025-08-18 11:27:03 +00:00
Fixed price history chart data parsing (fixes #1914)
This commit is contained in:
@@ -151,7 +151,7 @@ Grocy.Components.ProductCard.Refresh = function(productId)
|
||||
datasets[key] = []
|
||||
}
|
||||
chart.labels.push(moment(dataPoint.date).toDate());
|
||||
datasets[key].push(Number.parseFloat(dataPoint.price) * Number.parseFloat(productDetails.product.qu_factor_purchase_to_stock));
|
||||
datasets[key].push({ x: moment(dataPoint.date).toDate(), y: Number.parseFloat(dataPoint.price) * Number.parseFloat(productDetails.product.qu_factor_purchase_to_stock) });
|
||||
|
||||
});
|
||||
Object.keys(datasets).forEach((key) =>
|
||||
@@ -163,6 +163,7 @@ Grocy.Components.ProductCard.Refresh = function(productId)
|
||||
label: key,
|
||||
});
|
||||
});
|
||||
|
||||
Grocy.Components.ProductCard.PriceHistoryChart.update();
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user