Skip to content

feat(charts): add chart total badge and improve 3D tooltips#141

Merged
fahimfaisaal merged 1 commit into
mainfrom
feat/chart-total-and-3d-tooltips
Jun 20, 2026
Merged

feat(charts): add chart total badge and improve 3D tooltips#141
fahimfaisaal merged 1 commit into
mainfrom
feat/chart-total-and-3d-tooltips

Conversation

@fahimfaisaal

Copy link
Copy Markdown
Member

Summary

  • Add a Total badge to ChartCard for all axis shapes (1D, 2D, grouped 3D, value-mode 3D), summing plotted metric values and respecting hidden z-legend series
  • Show the value-mode 3D toggle when x+y data is present and the 3D engine is bundled, without requiring --3d on the CLI
  • Improve 3D tooltips (grouped + value-mode): per-axis marginals (Σx, Σy, Σz) appear before combined sums (Σ(x+y), Σ(x+y+z))
  • Move the grouped 3D grand total from the tooltip to the chart card badge

Changes

  • computeChartGrandTotal / formatChartTotal helpers in ui/src/lib/utils.ts
  • canOfferValue3D, datasetHasBothXY, datasetHas3DEngine for 3D toggle visibility
  • Shared 3D tooltip formatters updated in ui/src/composables/charts/shared/3d.ts
  • Settings panel / active chart shape wiring for value-mode 3D availability
  • Tests added/updated (utils.test.ts, 3d.test.ts, settings/shape tests)

Test plan

  • pnpm test in ui/ — 265 tests passing
  • go test ./... — all packages passing
  • Pre-commit hooks (ui-gen-check, go-test, format) passed

- Show Total badge on ChartCard for all axis shapes (1D/2D/3D)
- Offer value-mode 3D toggle when x+y data and the 3D engine are present
- Align grouped and value-mode 3D tooltip layout with per-axis marginals
  before combined Σ(x+y) and Σ(x+y+z) sums
- Move grouped 3D grand total from tooltip to the ChartCard badge
- Add computeChartGrandTotal/formatChartTotal helpers and tests
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fahimfaisaal
fahimfaisaal merged commit 82831b6 into main Jun 20, 2026
1 check passed
@fahimfaisaal
fahimfaisaal deleted the feat/chart-total-and-3d-tooltips branch June 20, 2026 07:16
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