From a82a31e5ad2ae94b50af1e4c7658baddc2e2305b Mon Sep 17 00:00:00 2001 From: MananTank Date: Tue, 28 Oct 2025 18:14:30 +0000 Subject: [PATCH] Dashboard: Use monotone curve type for AreaChart to avoid clipping (#8329) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ## 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}` ## 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. --- apps/dashboard/src/@/components/analytics/empty-chart-state.tsx | 2 +- apps/dashboard/src/@/components/blocks/charts/area-chart.tsx | 2 +- .../(instance)/[engineId]/metrics/components/ErrorRate.tsx | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/dashboard/src/@/components/analytics/empty-chart-state.tsx b/apps/dashboard/src/@/components/analytics/empty-chart-state.tsx index 70382246a77..d9999d69fbd 100644 --- a/apps/dashboard/src/@/components/analytics/empty-chart-state.tsx +++ b/apps/dashboard/src/@/components/analytics/empty-chart-state.tsx @@ -95,7 +95,7 @@ function SkeletonBarChart(props: { fill={`url(#${fillAreaSkeletonId})`} radius={8} stroke="hsl(var(--muted-foreground))" - type="natural" + type="monotone" /> )} diff --git a/apps/dashboard/src/@/components/blocks/charts/area-chart.tsx b/apps/dashboard/src/@/components/blocks/charts/area-chart.tsx index 92973c8369c..44412023713 100644 --- a/apps/dashboard/src/@/components/blocks/charts/area-chart.tsx +++ b/apps/dashboard/src/@/components/blocks/charts/area-chart.tsx @@ -172,7 +172,7 @@ export function ThirdwebAreaChart( key={key} stackId={props.variant !== "stacked" ? undefined : "a"} stroke={`var(--color-${key})`} - type="natural" + type="monotone" /> ), )} diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/(instance)/[engineId]/metrics/components/ErrorRate.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/(instance)/[engineId]/metrics/components/ErrorRate.tsx index dd34c8e2218..60e75014421 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/(instance)/[engineId]/metrics/components/ErrorRate.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/(instance)/[engineId]/metrics/components/ErrorRate.tsx @@ -59,7 +59,6 @@ export function ErrorRate({ datapoints }: { datapoints: ResultItem[] }) { key={tag} stackId="a" stroke={`var(--color-${tag})`} - type="natural" />, ); }