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

Master tree map chart adrm #5335

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

hokolomopo
Copy link
Contributor

@hokolomopo hokolomopo commented Dec 9, 2024

[IMP] charts: add tree map chart

This commits adds the "treemap" chart type to display hierarchical data.

We use the library https://chartjs-chart-treemap.pages.dev/ that we
patch a bit to have the render that we want.

[IMP] chart: add functionalities to TextStyler

Add the possibility of having a TextStyler that:

  • has no text input
  • can edit vertical algin
  • can edit text background color
  • made label optional

[REF] chart: simplify TextStyler component

This commit simplifies the TextStyler by

  • delete all the props updateColor, toggleBold, ... in favor of a
    single callback updateStyle
  • rename name props to label to be more explicit
  • use ActionButton components instead of custom HTML that looks like
    an action button

[MOV] chart: rename ChartTitle to TextStyler

Rename the ChartTitle component to TextStyler to make it sounds
more generic and to prepare for the next commits.

Task: 4364295

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 Dec 9, 2024

Pull request status dashboard

@hokolomopo hokolomopo force-pushed the master-tree-map-chart-adrm branch from 0f0ffd3 to c0b7ac9 Compare December 9, 2024 14:08
This commit simplifies the use of color scales in the conditional format
plugin and export the color scales to an helper.

Now we have a simple `getColorScale` helper, that take as argument
a number of value/color pairs (the thresholds) and return a function
that computes a color based on a value and the provided value/color
pairs.

All the complexity of the color scale computation is now hidden in
the helper, which simplify the use of color scale a lot and allows us
to use them in other places.

Task: 3265268
Rename the `ChartTitle` component to `TextStyler` to make it sounds
more generic and to prepare for the next commits.

Task: 4364295
@hokolomopo hokolomopo force-pushed the master-tree-map-chart-adrm branch from c0b7ac9 to ae06daf Compare December 9, 2024 15:01
This commit simplifies the `TextStyler` by

- delete all the props `updateColor`, `toggleBold`, ... in favor of a
single callback `updateStyle`
- rename `name` props to `label` to be more explicit
- use `ActionButton` components instead of custom HTML that looks like
an action button

Task: 4364295
Add the possibility of having a `TextStyler` that:

- has no text input
- can edit vertical algin
- can edit text background color
- made label optional

Task: 4364295
@hokolomopo hokolomopo force-pushed the master-tree-map-chart-adrm branch from ae06daf to bf69c5e Compare December 11, 2024 22:16
This commits adds the "treemap" chart type to display hierarchical data.

We use the library `https://chartjs-chart-treemap.pages.dev/` that we
patch a bit to have the render that we want.

Task: 4364295
@hokolomopo hokolomopo force-pushed the master-tree-map-chart-adrm branch from bf69c5e to 216b503 Compare December 12, 2024 12:53
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