Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMP] xlsx: support import/export of doughnut,pyramid & horizontal bar charts #5448

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Rachico
Copy link
Contributor

@Rachico Rachico commented Jan 9, 2025

This commit adds support for exporting & importing the charts mentioned above. Pyramid charts are not supported in Excel, therefore, we do a best effort by exporting them as horizontal bar charts.

Task: 3978237

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

@robodoo
Copy link
Collaborator

robodoo commented Jan 9, 2025

Pull request status dashboard

@Rachico Rachico force-pushed the master-xlsx-charts-mera branch 5 times, most recently from 2d3d4ab to f4c84b0 Compare January 10, 2025 18:01
…r charts

This commit adds support for exporting & importing the charts mentioned above.
Pyramid charts are not supported in Excel, therefore, we do a best effort by
exporting them as horizontal bar charts.

Task: 3978237
@Rachico Rachico force-pushed the master-xlsx-charts-mera branch from f4c84b0 to 087e6ac Compare January 13, 2025 09:53
@@ -180,7 +188,30 @@ export class PyramidChart extends AbstractChart {
}

getDefinitionForExcel(): ExcelChartDefinition | undefined {
return undefined;
// Excel does not support pyramid charts, therefore we return a bar
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see where in this method it's said the new type is "bar"

Comment on lines +87 to +89
plot = addDoughnutChart(chart.data, chartSheetIndex, data, {
holeSize: chart.data.isDoughnut ? 50 : 0,
});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since we already give chart.data to addDoughnutChart, couldn't we do the holeSize thing inside addDoughnutChart ?

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.

3 participants