Skip to content

Commit 5301ab4

Browse files
committed
Do a nice fast animation
1 parent 29834a3 commit 5301ab4

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

resources/scripts/components/server/StatGraphs.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@ const chartDefaults: ChartConfiguration = {
1717
enabled: false,
1818
},
1919
animation: {
20-
duration: 0,
21-
},
22-
hover: {
23-
animationDuration: 0,
20+
duration: 250,
2421
},
2522
elements: {
2623
point: {
@@ -58,7 +55,6 @@ const chartDefaults: ChartConfiguration = {
5855
},
5956
} ],
6057
},
61-
responsiveAnimationDuration: 0,
6258
},
6359
};
6460

@@ -133,7 +129,7 @@ export default () => {
133129
data.push(bytesToMegabytes(stats.memory_bytes));
134130
data.shift();
135131

136-
memory.update();
132+
memory.update({ lazy: true });
137133
}
138134

139135
if (cpu && cpu.data.datasets) {
@@ -142,7 +138,7 @@ export default () => {
142138
data.push(stats.cpu_absolute);
143139
data.shift();
144140

145-
cpu.update();
141+
cpu.update({ lazy: true });
146142
}
147143
};
148144

0 commit comments

Comments
 (0)