Skip to content

Commit c48baf7

Browse files
atrakhConvex, Inc.
authored and
Convex, Inc.
committed
dashboard: add a light background color to charts (#36186)
GitOrigin-RevId: abe7f578edd90e2e2b747f59e9f8c0a495854dc7
1 parent d82362a commit c48baf7

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

npm-packages/dashboard-common/src/elements/BigChart.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ export function BigChart({
115115
strokeWidth={1}
116116
vertical={false}
117117
verticalFill={[]}
118+
horizontalFill={[
119+
"rgba(var(--background-tertiary), 0.33)",
120+
]}
118121
syncWithTicks
119122
/>
120123
<Tooltip

npm-packages/dashboard-common/src/features/functions/components/SingleGraph.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ export function SingleGraph({
102102
horizontal
103103
strokeWidth={1}
104104
vertical={false}
105+
horizontalFill={["rgba(var(--background-tertiary), 0.33)"]}
105106
verticalFill={[]}
106107
syncWithTicks
107108
/>

npm-packages/dashboard-common/src/features/health/components/ChartForFunctionRate.tsx

+7
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,14 @@ export function ChartForFunctionRate({
198198
strokeWidth={1}
199199
vertical={false}
200200
verticalFill={[]}
201+
horizontalFill={["rgba(var(--background-tertiary), 0.33)"]}
201202
syncWithTicks
203+
horizontalValues={
204+
kind !== "schedulerStatus"
205+
? // For some reason (likely due to the size of the chart), ticks don't appear at 75 if the value is exactly 75. So, get as close to 75 as possible
206+
[0, 25, 50, 74.999, 100]
207+
: undefined
208+
}
202209
/>
203210

204211
{chartData.lineKeys.map((line) => {

npm-packages/dashboard/src/components/health/ChartForInsight.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ function InsightsLineChart<T extends Record<string, any>>({
110110
strokeWidth={1}
111111
vertical={false}
112112
verticalFill={[]}
113+
horizontalFill={["rgba(var(--background-tertiary), 0.33)"]}
113114
syncWithTicks
114115
/>
115116

0 commit comments

Comments
 (0)