Skip to content

Conversation

hokolomopo
Copy link
Contributor

Description

We have a "Smart chart engine" that automatically suggests a chart type and configuration based on the selected data. There were a bunch of issues with it:

  • some selected columns were sometime missing from the chart definition
  • the chart created was sometime empty
  • the order of the selected columns has totally ignored, leading to some strange definitions with a dataset [col1, col3] and labels on col2
  • we used a createBaseChart helper that casted an object into a ChartDefinition, skipping the typing and leading to wrong chart definitions with missing properties.
  • some rules were strange or inconsistent

This commit fixes those issues, making the rules simpler and more consistent, while adding some docstring to explain the desired behavior.

Task: 5079093

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

We have a "Smart chart engine" that automatically suggests a chart
type and configuration based on the selected data. There were a bunch
of issues with it:

- some selected columns were sometime missing from the chart definition
- the chart created was sometime empty
- the order of the selected columns has totally ignored, leading to some
strange definitions with a dataset [col1, col3] and labels on col2
- we used a `createBaseChart` helper that casted an object into a
`ChartDefinition`, skipping the typing and leading to wrong chart
definitions with missing properties.
- some rules were strange or inconsistent

This commit fixes those issues, making the rules simpler and more
consistent, while adding some docstring to explain the desired
behavior.

Task: 5079093
@robodoo
Copy link
Collaborator

robodoo commented Oct 3, 2025

Pull request status dashboard

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