Skip to content

Conversation

@subashtiwari1010
Copy link
Contributor

@subashtiwari1010 subashtiwari1010 commented Nov 26, 2025

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)

  • Feature

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.
image image
image image

Breaking change

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

  • Yes, and I documented them in migration notes
  • No

Other useful information

@subashtiwari1010 subashtiwari1010 added this to the 2026.01.00 milestone Nov 26, 2025
@subashtiwari1010 subashtiwari1010 marked this pull request as ready for review November 26, 2025 09:29
@allyoucanmap allyoucanmap linked an issue Nov 27, 2025 that may be closed by this pull request
2 tasks
@allyoucanmap allyoucanmap changed the title Add support for line traces classification Fix #11721 Add support for line traces classification Nov 27, 2025
@offtherailz offtherailz reopened this Dec 18, 2025
Copy link
Contributor

@allyoucanmap allyoucanmap left a 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:states layer on gs-stable
  • select Line Chart trace
  • select state_name as X Attribute
  • select land_km as Y Attribute
  • select AVG as Operation
  • select Classification style
  • select sub_region as 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
Copy link
Contributor

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'} /> }
Copy link
Contributor

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:

  • msMode property select with two options (label Mode):
    • Simple style
    • Classification style
  • mode property select with three options (label Type):
    • 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

- 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
@allyoucanmap allyoucanmap merged commit 40b8590 into geosolutions-it:master Jan 5, 2026
11 checks passed
@allyoucanmap
Copy link
Contributor

@ElenaGallo please test this enhancement on dev, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for line traces classification

3 participants