odoo/o-spreadsheet#7227

Created by BI, Adrien Minne (adrm)
Merged at 935b5ec2ffe5355a994f285e4bb1eec6d8d402b1

Statuses:

label
odoo:saas-18.2-fix-data-chart-labels-adrm
head
7d060e422ea0d267c3cdb25729910f31521d52c0
merged
2 days ago by BI, Rémi Rahir (rar)
odoo/o-spreadsheet
saas-18.2 #7227
saas-18.3 #7267
saas-18.4 #7268
19.0 #7270
master #7274

[FIX] chart: wrong label format for date chart

Description

Date charts would always have a datetime format for the labels, no matter the format of the data. They would also be truncated, which we probably don't want for dates.

The issue is that the date charts had a callback for the ticks using truncateLabel, and getLabelForValue which seems bugged in date charts[1].

This commit removes the tick callback for date charts, letting the luxon time adapter format the dates.

[1] chartjs/Chart.js#12128

Task: 4908471

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