Skip to content

Commit a82a31e

Browse files
committed
Dashboard: Use monotone curve type for AreaChart to avoid clipping (#8329)
<!-- ## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes" If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000): ## Notes for the reviewer Anything important to call out? Be sure to also clarify these in your comments. ## How to test Unit tests, playground, etc. --> <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on updating the `type` property for charts from `natural` to `monotone` in various components to improve the visual representation of the data. ### Detailed summary - In `empty-chart-state.tsx`, changed `type` from `natural` to `monotone`. - In `area-chart.tsx`, changed `type` from `natural` to `monotone`. - In `ErrorRate.tsx`, changed `type` from `natural` to `monotone`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Style** * Updated chart line rendering across multiple dashboard components for improved visual consistency. Area and bar charts now use refined curve interpolation for smoother data visualization. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 3d235e2 commit a82a31e

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

apps/dashboard/src/@/components/analytics/empty-chart-state.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ function SkeletonBarChart(props: {
9595
fill={`url(#${fillAreaSkeletonId})`}
9696
radius={8}
9797
stroke="hsl(var(--muted-foreground))"
98-
type="natural"
98+
type="monotone"
9999
/>
100100
</AreaChart>
101101
)}

apps/dashboard/src/@/components/blocks/charts/area-chart.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ export function ThirdwebAreaChart<TConfig extends ChartConfig>(
172172
key={key}
173173
stackId={props.variant !== "stacked" ? undefined : "a"}
174174
stroke={`var(--color-${key})`}
175-
type="natural"
175+
type="monotone"
176176
/>
177177
),
178178
)}

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/(instance)/[engineId]/metrics/components/ErrorRate.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ export function ErrorRate({ datapoints }: { datapoints: ResultItem[] }) {
5959
key={tag}
6060
stackId="a"
6161
stroke={`var(--color-${tag})`}
62-
type="natural"
6362
/>,
6463
);
6564
}

0 commit comments

Comments
 (0)