Skip to content
TypeScript

fix(mobile): usage chart bars round at the top instead of the bottom (#21383)

Aditya Vardhan Sharma417bc7971112
diff --git a/apps/mobile/src/features/usage/UsageDailyChart.tsx b/apps/mobile/src/features/usage/UsageDailyChart.tsx
index ed16aaf7b1b..5d64cf9dbc7 100644
--- a/apps/mobile/src/features/usage/UsageDailyChart.tsx
+++ b/apps/mobile/src/features/usage/UsageDailyChart.tsx
@@ -21,7 +21,11 @@ export function UsageDailyChart({ days, daily, metric, height }: UsageDailyChart
<View style={{ height }} className="flex-row items-end gap-px">
{/* Use column-reverse: provider values are bottom-first and Hermes lacks toReversed. */}
{chartDays.map((day) => (
- <View key={day.day} className="h-full flex-1 flex-col-reverse overflow-hidden rounded-sm">
+ <View
+ key={day.day}
+ style={{ height: max === 0 ? 0 : (day.total / max) * height }}
+ className="flex-1 flex-col-reverse overflow-hidden rounded-t-sm"
+ >
{day.values.map((entry) => (
<View
key={entry.provider}