odoo/o-spreadsheet#7274

Created by fw-bot
Merged at 52561239aecd3910e0d98b41016dbdd504cd538b

Statuses:

label
odoo:master-saas-18.2-fix-data-chart-labels-adrm-468680-fw
head
b3fbb5f550066510d61bc6a5db6bb6bba11033ee
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

Forward-Port-Of: #7227