odoo / o-spreadsheet

Other
193 stars 44 forks source link

[FW][FIX] charts: Add missing "showValue" handler for Pie and waterfall c… #4788

Closed fw-bot closed 2 months ago

fw-bot commented 2 months ago

…harts

The typing of chart.js is NOT our friend and it shows again. Expecially the type ChartOptions that applies a deepPartial on each of its properties, including the plugin recently introduced: chartShowValuesPlugin.

Long story short, if provided with showValues=true, the plugin REQUIRES a callback function to format the data value. Unfortunately, the DeepPartial completely hides this requirement.

This bug was also missed because we do not directly test chart.js lib in our tests and it will be the subject of a task in the near future. In the meantime, we will strengthen the test case in our main integration (Odoo).

Task: 4081436

Description:

description of this task, what is implemented and why it is implemented that way.

Task: : TASK_ID

review checklist

Forward-Port-Of: odoo/o-spreadsheet#4728

robodoo commented 2 months ago

Pull request status dashboard

fw-bot commented 2 months ago

@rrahir @LucasLefevre cherrypicking of pull request odoo/o-spreadsheet#4728 failed.

stdout:

Auto-merging src/helpers/figures/charts/bar_chart.ts
Auto-merging src/helpers/figures/charts/chart_common.ts
CONFLICT (content): Merge conflict in src/helpers/figures/charts/chart_common.ts
Auto-merging src/helpers/figures/charts/chart_common_line_scatter.ts
CONFLICT (content): Merge conflict in src/helpers/figures/charts/chart_common_line_scatter.ts
Auto-merging src/helpers/figures/charts/combo_chart.ts

Either perform the forward-port manually (and push to this branch, proceeding as usual) or close this PR (maybe?).

In the former case, you may want to edit this PR message as well.

:warning: after resolving this conflict, you will need to merge it via @robodoo.

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

rrahir commented 2 months ago

@robodoo r+