+ {config.backgroundChart && (
+
+ )}
+
+
+ {formattedValue ?? 'N/A'}
+
+
+
)}
);
diff --git a/packages/app/src/components/NumberTileBackgroundChart.tsx b/packages/app/src/components/NumberTileBackgroundChart.tsx
new file mode 100644
index 0000000000..22d57fdc46
--- /dev/null
+++ b/packages/app/src/components/NumberTileBackgroundChart.tsx
@@ -0,0 +1,217 @@
+import { useMemo } from 'react';
+import { ErrorBoundary } from 'react-error-boundary';
+import {
+ Area,
+ AreaChart,
+ Line,
+ LineChart,
+ ResponsiveContainer,
+} from 'recharts';
+import { isBuilderChartConfig } from '@hyperdx/common-utils/dist/guards';
+import {
+ BackgroundChart,
+ ChartConfigWithDateRange,
+ ChartPaletteToken,
+ DisplayType,
+ resolveChartPaletteToken,
+} from '@hyperdx/common-utils/dist/types';
+
+import {
+ convertToTimeChartConfig,
+ formatResponseForTimeChart,
+ shouldFillNullsWithZero,
+ useTimeChartSettings,
+} from '@/ChartUtils';
+import { useQueriedChartConfig } from '@/hooks/useChartConfig';
+import { useSource } from '@/source';
+import { getColorFromCSSToken } from '@/utils';
+
+// Trend hue used when neither the background override nor the tile's static
+// `color` is set, so a sparkline is always visible once enabled.
+const DEFAULT_BACKGROUND_TOKEN: ChartPaletteToken = 'chart-blue';
+
+// The sparkline sits behind the value, so it is intentionally low-contrast:
+// a translucent stroke with a fainter area fill.
+const STROKE_OPACITY = 0.5;
+const STROKE_WIDTH = 2;
+const AREA_FILL_OPACITY = 0.15;
+
+// `y` is the plotted value; `x` (bucket timestamp, seconds) is retained for
+// ordering and future axis use. With no `