Skip to content

Conversation

@Raghav0201
Copy link

Summary

This PR adds a new Label Position option for bar chart data labels in Insights.
Users can now choose where data labels appear: Top, Center, or Bottom.

Why this is needed

Earlier, Insights had limited control over data label placement.
For dense bar charts, labels often overlap or are difficult to read.
This enhancement improves readability and restores a previously available feature.

What’s added

  • New label_position field in Y-Axis configuration
  • UI dropdown to choose label position (Top / Center / Bottom)
  • Respect user-selected position for bar charts
  • Line charts continue to use top by default
  • Fully compatible with:
    • stacked bars
    • swapped axis charts
    • normalized charts

How it works

  • The selected label_position is stored in y_axis.label_position
  • helpers.ts reads this value and applies it to all bar series
  • Line series ignore this setting (as expected)

Testing done

  • Tested in local bench build
  • Verified with dashboard widgets
  • Checked with multiple series, stacked bars, and split-by charts

Screenshots

  • Chart View
image
  • When the user enables “Show Data Labels”, a new dropdown called “Label Position” becomes visible.
image
  • User can select Top / Center / Bottom
image
  • Center Label View
image
  • Bottom Label View
image

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