odoo/o-spreadsheet#7270

Created by fw-bot
Merged at ca2956ff7a0418252a4acd09b88e3ac271fa7dc2

Statuses:

label
odoo:19.0-saas-18.2-fix-data-chart-labels-adrm-468677-fw
head
04520c7da2826210ea1cef688d3c549b101fe5c5
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