Skip to content

fix(charts): simplify grid bottom to dataZoom-only branching#138

Merged
fahimfaisaal merged 2 commits into
mainfrom
fix/chart-grid-datazoom-only
Jun 20, 2026
Merged

fix(charts): simplify grid bottom to dataZoom-only branching#138
fahimfaisaal merged 2 commits into
mainfrom
fix/chart-grid-datazoom-only

Conversation

@fahimfaisaal

Copy link
Copy Markdown
Member

Summary

Simplifies bar/line chart bottom layout so grid spacing only branches on dataZoom presence, not axis title or rotated labels.

Changes

  • With dataZoom (>50 x categories): fixed bottom: 100px, containLabel: false (unchanged)
  • Without dataZoom: fixed bottom: 28px with containLabel: true — ECharts automatically absorbs axis title and rotated tick space, preserving plot height whether or not an axis title is present
  • Axis title font bumped to 16px (series ticks stay at 12px)
  • Removed hasXAxisName / hasRotatedLabels grid options from bar/line composables
  • Regenerated embedded UI (pkg/template/vizb-ui.gen.go)

Testing

  • pnpm vitest run src/composables/charts/shared/chartConfig.test.ts
  • Full UI test suite (228 tests)
  • Go test suite

Reserve the large fixed bottom band only when the dataZoom slider is shown.
Without dataZoom, use a 28px tick band with containLabel so axis titles and
rotated ticks fit without shrinking plot height. Bump axis title font to 16px
and drop hasXAxisName/hasRotatedLabels grid options.
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Extract a badge-sized button component and use it for the chart
stats toggle so it aligns visually with axis count badges.
@fahimfaisaal
fahimfaisaal merged commit 0b1d9c6 into main Jun 20, 2026
1 check passed
@fahimfaisaal
fahimfaisaal deleted the fix/chart-grid-datazoom-only branch June 20, 2026 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants