Skip to content

[FIX] calendar chart: skip missing value tooltips#9048

Open
dhrp-odoo wants to merge 1 commit into
saas-19.3from
saas-19.3-fix-calender-chart-tooltip-dhrp
Open

[FIX] calendar chart: skip missing value tooltips#9048
dhrp-odoo wants to merge 1 commit into
saas-19.3from
saas-19.3-fix-calender-chart-tooltip-dhrp

Conversation

@dhrp-odoo

Copy link
Copy Markdown
Contributor

Description:

Calendar chart datasets use data as a Chart.js rendering payload, where every bucket is drawn with a constant value. The actual cell values are stored separately in values, which is only used by our tooltips and show-values plugin.

Before this commit, missing calendar values were stored as NaN in values. This is the right sentinel for Chart.js data points, but not for this metadata: the tooltip filter only skips undefined, so missing buckets still displayed a tooltip and formatted NaN as 1.00e-NaN.

This commit stores missing calendar metadata as undefined, keeping empty buckets out of tooltips/show-values while preserving real numeric values.

Task: 6276800

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

Calendar chart datasets use `data` as a Chart.js rendering payload,
where every bucket is drawn with a constant value. The actual cell
values are stored separately in `values`, which is only used by our
tooltips and show-values plugin.

Before this commit, missing calendar values were stored as `NaN` in
`values`. This is the right sentinel for Chart.js data points, but not
for this metadata: the tooltip filter only skips `undefined`, so missing
buckets still displayed a tooltip and formatted `NaN` as `1.00e-NaN`.

This commit stores missing calendar metadata as `undefined`, keeping
empty buckets out of tooltips/show-values while preserving real numeric
values.

Task: 6276800
@robodoo

robodoo commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Pull request status dashboard

@dhrp-odoo dhrp-odoo marked this pull request as ready for review June 30, 2026 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants