odoo/o-spreadsheet#5756
Created by BI, Adrien Minne (adrm)
Ready (waiting for staging)
- label
- odoo:master-sunburst-chart-adrm
- head
- c6c0fc83fa240ebba240504ba1e8c4c08b6f1c04
odoo/o-spreadsheet | |
---|---|
master | #5756 |
Master sunburst chart adrm
Description:
[IMP] demo: add demo data for sunburst chart
[IMP] chart: add sunburst chart
This commit adds a new chart type: sunburst chart. The sunburst chart
is used to display hierarchical data in a circular chart.
Technically, the chart is implemented using a doughnut chart with
multiple levels and invisible segments.
[IMP] chart: add ChartWithAxisDefinition
type
Before this, we used the type ChartWithDataSetDefinition
in the
component AxisDesignEditor
. Which was wrong because there are charts
with datasets but no axis (geo, pie). It forced those chart to have a
unused key axisDesign
in their definition.
The aggregated
key in the geo chart definition is also never used
(they are always aggregated).
[IMP] tests: define default creation context for chart tests
Every type of chart has a test that checks what happens if we
create a chart from a creation context. But every time we add something
new to to creation context, we have to change every single test, even
if the chart doesn't use the new key of the context.
This commits adds a constant with a default creation context to
simplify the tests.
[IMP] chart: extract ChartTitle
tools into TextStyler
This commit extract the style editing tools of the ChartTitle
component into a new component called TextStyler
. This will be used
in the following commits to have a more generic component that can be
used to style any text in the chart.
It also adds add the possibility ot edit a background color or a
vertical alignment in this TextStyler
component.
The commit also simplifies the TextStyler compared to the previous
behaviour of ChartTitle
by:
- deleting all the props updateColor, toggleBold, ... in favor of a
single callback updateStyle - using ActionButton components instead of custom HTML that looks like
an action button
[MOV] chart: rename title
files to chart_title
Task: 4575651
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