Skip to content
This repository was archived by the owner on Jun 6, 2025. It is now read-only.

Commit fdb3c35

Browse files
committed
Redesign counts for funnel
1 parent 160db46 commit fdb3c35

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

packages/polaris-viz/src/components/FunnelChartNext/components/FunnelChartLabels/FunnelChartLabels.tsx

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ const LINE_GAP = 5;
1616
const LINE_PADDING = 4;
1717
const GROUP_OFFSET = 10;
1818
const LABEL_FONT_SIZE = 12;
19-
const PERCENT_FONT_SIZE = 14;
20-
const PERCENT_FONT_WEIGHT = 650;
21-
const VALUE_FONT_SIZE = 13;
19+
const VALUE_FONT_SIZE = 14;
20+
const VALUE_FONT_WEIGHT = 650;
2221
const TREND_INDICATOR_SPACING = 8;
2322
export const LABEL_VERTICAL_OFFSET = 2;
2423

@@ -72,8 +71,8 @@ export function FunnelChartLabels({
7271

7372
const percentWidth = estimateStringWidthWithOffset(
7473
percentages[index],
75-
PERCENT_FONT_SIZE,
76-
PERCENT_FONT_WEIGHT,
74+
VALUE_FONT_SIZE,
75+
VALUE_FONT_WEIGHT,
7776
);
7877

7978
const formattedValueWidth = estimateStringWidthWithOffset(
@@ -124,8 +123,8 @@ export function FunnelChartLabels({
124123

125124
const percentWidth = estimateStringWidthWithOffset(
126125
percentages[index],
127-
PERCENT_FONT_SIZE,
128-
PERCENT_FONT_WEIGHT,
126+
VALUE_FONT_SIZE,
127+
VALUE_FONT_WEIGHT,
129128
);
130129

131130
const {trendIndicatorProps, trendIndicatorWidth} =
@@ -173,18 +172,18 @@ export function FunnelChartLabels({
173172
text={percentages[index]}
174173
targetWidth={targetWidth}
175174
textAnchor="start"
176-
fontSize={PERCENT_FONT_SIZE}
177-
fontWeight={PERCENT_FONT_WEIGHT}
175+
fontSize={VALUE_FONT_SIZE}
176+
fontWeight={VALUE_FONT_WEIGHT}
178177
/>
179178
{canShowAllFormattedValues && (
180179
<SingleTextLine
181180
color={VALUE_COLOR}
182181
text={formattedValues[index]}
183182
targetWidth={targetWidth}
184183
x={percentWidth + LINE_PADDING}
185-
y={1}
186184
textAnchor="start"
187185
fontSize={VALUE_FONT_SIZE}
186+
fontWeight={VALUE_FONT_WEIGHT}
188187
/>
189188
)}
190189
{trendIndicatorProps && (

0 commit comments

Comments
 (0)