feat(system-resources-widget): add has-shadow option (#4093)

This commit is contained in:
Meier Lukas authored and GitHub committed 2025-09-19 16:58:46 +02:00
1 parent 312e084e2c
commit 3c2e6a852f
10 files changed
+37 -15

No files matched your search

@@ -10,10 +10,12 @@ import { CommonChart } from "./common-chart";
export const SystemResourceMemoryChart = ({
memoryUsageOverTime,
totalCapacityInBytes,
hasShadow,
labelDisplayMode,
}: {
memoryUsageOverTime: number[];
totalCapacityInBytes: number;
hasShadow: boolean;
labelDisplayMode: LabelDisplayModeOption;
}) => {
const chartData = memoryUsageOverTime.map((usage, index) => ({ index, usage }));
@@ -35,6 +37,7 @@ export const SystemResourceMemoryChart = ({
labelDisplayMode={labelDisplayMode}
yAxisProps={{ domain: [0, totalCapacityInBytes] }}
lastValue={percentageUsed !== undefined ? `${Math.round(percentageUsed * 100)}%` : undefined}
chartType={hasShadow ? "area" : "line"}
tooltipProps={{
content: ({ payload }) => {
if (!payload) {