Skip to content

Conversation

fw-bot
Copy link
Collaborator

@fw-bot fw-bot commented Oct 8, 2025

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

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
X-original-commit: 935b5ec
@robodoo
Copy link
Collaborator

robodoo commented Oct 8, 2025

Pull request status dashboard

@fw-bot
Copy link
Collaborator Author

fw-bot commented Oct 8, 2025

This PR targets saas-18.3 and is part of the forward-port chain. Further PRs will be created up to master.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

robodoo pushed a commit that referenced this pull request Oct 8, 2025
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

closes #7267

Task: 4908471
X-original-commit: 935b5ec
Signed-off-by: Rémi Rahir (rar) <[email protected]>
@robodoo robodoo closed this Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants