-
Notifications
You must be signed in to change notification settings - Fork 50
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 sunburst chart adrm #5756
Open
hokolomopo
wants to merge
8
commits into
master
Choose a base branch
from
master-sunburst-chart-adrm
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rrahir
reviewed
Feb 27, 2025
src/components/side_panel/chart/building_blocks/text_styler/text_styler.ts
Outdated
Show resolved
Hide resolved
src/components/side_panel/chart/building_blocks/text_styler/text_styler.xml
Outdated
Show resolved
Hide resolved
0baa01c
to
44f0936
Compare
Task: 4575651
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 Task: 4575651
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. Task: 4575651
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). Task: 4575651
4d85a3e
to
06a3900
Compare
3f0ff3d
to
75de4cd
Compare
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. Task: 4575651
Task: 4575651
When hovering a sunburst item, an offset is added to the pie slice, but the position of the label was not updated accordingly. Task: 4575651
With this commit, the children of the hovered item in the sunburst chart are highlighted in addition to the hovered item, and the other elements are dimmed. This is done by adding a new plugin to the `ChartJS`. The plugin `sunburstHoverPlugin` make the children of the hovered item `active`, so they get the hovered offset and color. Task: 4575651
75de4cd
to
c6c0fc8
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
typeBefore this, we used the type
ChartWithDataSetDefinition
in thecomponent
AxisDesignEditor
. Which was wrong because there are chartswith 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 intoTextStyler
This commit extract the style editing tools of the
ChartTitle
component into a new component called
TextStyler
. This will be usedin 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:single callback updateStyle
an action button
[MOV] chart: rename
title
files tochart_title
Task: 4575651
review checklist