Skip to content

Commit 12fa643

Browse files
fix: Funnel hover color (#1018)
* fix: padding, background (#1017)
1 parent 18511b2 commit 12fa643

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/components/chart-elements/FunnelChart/FunnelChart.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -359,16 +359,14 @@ const FunnelChartPrimitive = React.forwardRef<HTMLDivElement, FunnelChartProps>(
359359
<g key={`bar-${index}`}>
360360
{/* Hover gray rect */}
361361
<rect
362-
x={item.startX - 0.5 * gap + HALF_PADDING + yAxisPadding}
362+
x={item.startX - gap * 0.5 + HALF_PADDING + yAxisPadding}
363363
y={HALF_PADDING}
364364
width={barWidth + gap}
365365
height={realHeight}
366366
fill="currentColor"
367367
className={tremorTwMerge(
368-
"z-0 opacity-5",
369-
tooltip.index === index
370-
? "text-tremor-background-emphasis"
371-
: "text-transparent",
368+
"z-0",
369+
tooltip.index === index ? "text-[#d1d5db]/15" : "text-transparent",
372370
)}
373371
/>
374372

src/stories/chart-elements/FunnelChart.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ import { currencyValueFormatter } from "lib";
88

99
const data = [
1010
{ name: "opens", value: 351 },
11-
{ name: "visitors and a longer label to test the truncate class", value: 200 },
11+
{ name: "visitors", value: 200 },
1212
{
1313
name: `added to cart`,
1414
value: 191,
1515
},
16-
{ name: "orders", value: 10 },
16+
{ name: "orders and a longer label to test the truncate class", value: 10 },
1717
];
1818

1919
const meta: Meta<typeof FunnelChart> = {

0 commit comments

Comments
 (0)