Skip to content

fix(ui): keep grouped 3D z-axis name with transparent text#199

Merged
fahimfaisaal merged 4 commits into
mainfrom
fix/grouped-3d-invisible-z-axis-name
Jul 12, 2026
Merged

fix(ui): keep grouped 3D z-axis name with transparent text#199
fahimfaisaal merged 4 commits into
mainfrom
fix/grouped-3d-invisible-z-axis-name

Conversation

@fahimfaisaal

@fahimfaisaal fahimfaisaal commented Jul 11, 2026

Copy link
Copy Markdown
Member

Related Issues

Follow-up to #192 / #188 — empty zAxis3D.name fixed the misleading label but dropped title framing so the metric scale looked crushed on first view.

Summary

  • Grouped 3D charts keep the z-axis name for echarts-gl layout, but paint the title with transparent text so the grouping column is not shown as a height label.
  • Value-mode charts still show the metric name on the vertical axis as before.
  • Docs updated to describe transparent-name behavior for grouped 3D.

Changes

  • Added axis3DNameInvisible() in ui/src/composables/charts/shared/3d.ts (name + nameTextStyle.color: 'transparent' only).
  • Wired it into grouped mode for bar / line / scatter 3D options (replaces name: '').
  • Updated useGrouped3DZAxisLabel.test.ts to assert name + transparent color.
  • Updated grouped 3D docs in docs/src/content/docs/charts/3d.mdx.

Test Result

cd ui
pnpm vitest run \
  src/composables/charts/useGrouped3DZAxisLabel.test.ts \
  src/composables/charts/useScatter3DChartOptions.test.ts \
  src/composables/charts/shared/3d.test.ts

All tests passed.

Manual check (recommended):

vizb bar examples/csv/sales.csv -g product,region,category -p n,x,y --3d -o /tmp/grouped-3d.html
  • Vertical axis title should not be visible
  • Height scale should not look crushed on first load
  • Legend still shows z group values
  • Switching bar/line/scatter 3D and light/dark should not leave a sticky visible z title

Empty z-axis names removed nameGap framing and made the metric scale look
crushed on first view. Keep the axis name (and gap) for layout while
rendering it transparent so the grouping column is not shown as a height title.
Only name + transparent color are needed; font size/weight and nameGap
were copied from the visible axis helper without adding behavior.
@fahimfaisaal
fahimfaisaal merged commit 8a34f1d into main Jul 12, 2026
4 checks passed
@fahimfaisaal
fahimfaisaal deleted the fix/grouped-3d-invisible-z-axis-name branch July 12, 2026 04:45
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.

1 participant