-
Notifications
You must be signed in to change notification settings - Fork 444
Fix #11721 Add support for line traces classification #11733
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
Fix #11721 Add support for line traces classification #11733
Conversation
…into feat/add-line-classification
…at/add-line-classification
…at/add-line-classification
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an error by following these steps:
- open a new dashboard
- create a new chart with
mapstore:stateslayer on gs-stable - select Line Chart trace
- select
state_nameas X Attribute - select
land_kmas Y Attribute - select AVG as Operation
- select Classification style
- select
sub_regionas Classification Attribute - now switch the chart trace to Bar Chart
- switch again the trace to Line Chart
- select Classification style
Expected:
- chart builder is visible wit the correct preview
Current:
- error in console and grey page
Note: this seems to happen with the specific mapstore:states layer
| enableBarChartStack, | ||
| FONT | ||
| FONT, | ||
| DEFAULT_CLASSIFICATION |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need DEFAULT_CLASSIFICATION? Are we doing a similar thing in bar chart?
| { value: 'lines', label: 'Line' }, | ||
| { value: 'markers', label: 'Scatter' } | ||
| { value: 'markers', label: 'Scatter' }, | ||
| { value: 'classification', label: <Message msgId={'styleeditor.classificationStyle'} /> } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From UI I think we should split the mode from msMode property and have two select. This means we should have:
msModeproperty select with two options (labelMode):- Simple style
- Classification style
modeproperty select with three options (labelType):- Line with markers
- Line
- Scatter
Note: when we switch from Simple to Classification style we may need to manage the Line with markers options because it needs two different colors one for line and one for markers. I think we could hide Line with markers when classification style is selected.
In this way we will be able to use the scatter chart in classification mode
…at/add-line-classification
- Add the msMode with simple and classification options - Add the type with line, scatter, line + marker options - Displays the charts based on selected msMode and type values
|
@ElenaGallo please test this enhancement on dev, thanks |
Description
This PR adds the classification mode for the line chart so that the line traces can be categorized for the visualization.
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x", remove the others)
Issue
What is the current behavior?
Currently, the line trace only supports line, line+marker, and scatter type charts.
#11721
What is the new behavior?
The line traces type will have classification style in dropdown and after it is selected the line traces will be categorized according to the classification attribute field selected.


Breaking change
Does this PR introduce a breaking change? (check one with "x", remove the other)
Other useful information