Skip to content

feat(render): snake_case field names display as Title Case#2746

Open
jswir wants to merge 1 commit into
malloydata:mainfrom
jswir:feat/snake-to-title-case
Open

feat(render): snake_case field names display as Title Case#2746
jswir wants to merge 1 commit into
malloydata:mainfrom
jswir:feat/snake-to-title-case

Conversation

@jswir
Copy link
Copy Markdown
Contributor

@jswir jswir commented Apr 1, 2026

Summary

  • getLabel() on FieldBase now converts snake_case field names to Title Case by default (e.g., avg_retail → "Avg Retail")
  • # label annotation still overrides when set
  • Updated all chart axis titles, legend titles, and big-value labels to use getLabel() instead of raw field.name for display
  • Removed duplicate snakeToTitleCase from big-value plugin

Affected components

  • Tables (column headers)
  • Dashboards (card titles, dimension labels)
  • Bar charts (axis + legend titles)
  • Line charts (axis + legend titles)
  • Scatter charts (all axis titles)
  • Segment map / shape map (color legend titles)
  • Big value (field labels)

Test plan

  • Verify dashboard stories show Title Case labels (e.g., "Avg Retail" not avg_retail)
  • Verify # label override still works (Dashboard Dense story has # label='Custom kpi label')
  • Verify chart axis titles are Title Case in bar/line chart stories
  • Verify table column headers are Title Case

getLabel() now converts snake_case to Title Case by default.
# label annotation still overrides. Updated all chart axis titles,
legend titles, and big-value labels to use getLabel() instead of
raw field.name for display.

Signed-off-by: James Swirhun <james@credibledata.com>
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