odoo/o-spreadsheet#8030

Created by Ronakkumar Mukeshbhai Bharadiya (rmbh)

Blocked

label
odoo:18.0-fix-line-chart-show-value-cut-on-edges-rmbh
head
2c868bd140ad02b4625abbe7d70071d3c4f849d4
odoo/o-spreadsheet
18.0 #8030 missing r+
saas-18.2
saas-18.3
saas-18.4
19.0
saas-19.1
saas-19.2
master

[FIX] chart: prevent line chart value labels from clipping

Description:

Current behavior before PR:
- Line chart value labels were clipped at chart edges.
- First and last points could cut horizontally at left/right.
- Top-most points could cut vertically at the top boundary.
- Positioning relied on clamp, causing labels to stick to borders.

Desired behavior after PR is merged:
- Implement smart boundary-aware positioning for line labels.
- Flip label below point if it cannot fit above.
- Add horizontal edge detection and adjust textAlign dynamically.
- Preserve existing bar chart behavior and layout settings.

Task: 5993132

review checklist

  • [ ] feature is organized in plugin, or UI components
  • [ ] support of duplicate sheet (deep copy)
  • [ ] in model/core: ranges are Range object, and can be adapted (adaptRanges)
  • [ ] in model/UI: ranges are strings (to show the user)
  • [ ] undo-able commands (uses this.history.update)
  • [ ] multiuser-able commands (has inverse commands and transformations where needed)
  • [ ] new/updated/removed commands are documented
  • [ ] exportable in excel
  • [ ] translations (_t("qmsdf %s", abc))
  • [ ] unit tested
  • [ ] clean commented code
  • [ ] track breaking changes
  • [ ] doc is rebuild (npm run doc)
  • [ ] status is correct in Odoo