Skip to content

Commit 0500c85

Browse files
committed
fix: hover effect
1 parent 7ac533b commit 0500c85

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

apps/dashboard/app/(main)/billing/cost-breakdown/components/consumption-chart.tsx

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { Skeleton } from '@/components/ui/skeleton';
1717
import type { UsageResponse } from '@databuddy/shared';
1818
import { calculateOverageCost, type OverageInfo } from '../utils/billing-utils';
1919

20+
2021
type ViewMode = 'daily' | 'cumulative';
2122

2223
import { METRIC_COLORS } from '@/components/charts/metrics-constants';
@@ -144,7 +145,7 @@ export function ConsumptionChart({ usageData, isLoading, onDateRangeChange, over
144145

145146
return (
146147
<div className="h-full flex flex-col border-b">
147-
<div className="px-6 py-4 border-b bg-muted/20">
148+
<div className="px-6 py-4 border-b bg-muted/20">
148149
<div className="flex items-center justify-between">
149150
<div className="flex items-center gap-2">
150151
<ChartBarIcon className="h-5 w-5" weight="duotone" />
@@ -206,7 +207,13 @@ export function ConsumptionChart({ usageData, isLoading, onDateRangeChange, over
206207
<div className="flex-1 px-6 py-6">
207208
<div className="h-full">
208209
<ResponsiveContainer width="100%" height="100%">
209-
<BarChart data={chartData} margin={{ top: 20, right: 30, left: 20, bottom: 5 }}>
210+
<BarChart
211+
data={chartData}
212+
margin={{ top: 20, right: 30, left: 20, bottom: 5 }}
213+
style={{
214+
cursor: 'default'
215+
}}
216+
>
210217
<defs>
211218
{Object.entries(EVENT_TYPE_COLORS).map(([key, color]) => (
212219
<linearGradient
@@ -298,12 +305,7 @@ export function ConsumptionChart({ usageData, isLoading, onDateRangeChange, over
298305
}
299306
return null;
300307
}}
301-
cursor={{
302-
stroke: 'var(--primary)',
303-
strokeWidth: 1,
304-
strokeOpacity: 0.5,
305-
strokeDasharray: '4 4',
306-
}}
308+
cursor={false}
307309
wrapperStyle={{ outline: 'none' }}
308310
/>
309311
<Legend
@@ -353,6 +355,10 @@ export function ConsumptionChart({ usageData, isLoading, onDateRangeChange, over
353355
stroke={EVENT_TYPE_COLORS[eventType as keyof typeof EVENT_TYPE_COLORS]}
354356
strokeWidth={0.5}
355357
hide={!!hiddenTypes[eventType]}
358+
style={{
359+
filter: 'none',
360+
transition: 'none'
361+
}}
356362
/>
357363
))}
358364
</BarChart>

0 commit comments

Comments
 (0)