Skip to content

Commit 520fa6a

Browse files
committed
Only hide bar labels when zoom is enabled
1 parent d0ede77 commit 520fa6a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/webapp/app/components/primitives/charts/ChartBar.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,9 @@ export function ChartBarRenderer({
118118
}
119119

120120
// Get the x-axis ticks based on tooltip state
121+
// Only hide middle ticks when zoom is enabled (to make room for zoom instructions)
121122
const xAxisTicks =
122-
highlight.tooltipActive && data.length > 2
123+
enableZoom && highlight.tooltipActive && data.length > 2
123124
? [data[0]?.[dataKey], data[data.length - 1]?.[dataKey]]
124125
: undefined;
125126

0 commit comments

Comments
 (0)