fix(system-charts): Zeitachse angepasst – aktuelle Daten jetzt rechts wie bei Kabelüberwachung
This commit is contained in:
@@ -38,7 +38,11 @@ type Props = {
|
||||
zeitraum: "DIA0" | "DIA1" | "DIA2";
|
||||
};
|
||||
export const SystemCharts = ({ history }: Props) => {
|
||||
const labels = history.map((h) => new Date(h.time).toLocaleTimeString());
|
||||
const reversedHistory = [...history].reverse();
|
||||
const labels = reversedHistory.map((h) =>
|
||||
new Date(h.time).toLocaleTimeString()
|
||||
);
|
||||
|
||||
const formatValue = (v: number) => v.toFixed(2);
|
||||
|
||||
const baseOptions = {
|
||||
|
||||
Reference in New Issue
Block a user