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

Multivariable charts #8755

Closed
dsuren1 opened this issue Nov 2, 2022 · 0 comments · Fixed by #9655 or #9671
Closed

Multivariable charts #8755

dsuren1 opened this issue Nov 2, 2022 · 0 comments · Fixed by #9655 or #9671
Assignees
Milestone

Comments

@dsuren1
Copy link
Contributor

dsuren1 commented Nov 2, 2022

Description

  • Support to multi variable charts (now we have wfsChart or wpsChart enhancer to retrieve data, we may have multiple services)
  • Refactor of the widget config UI.
  • Backward compatibility. Define a model that is compatible and allows to edit old charts, together with these new charts.

Finalized implementation flow

Multivariable chart

1. Current chart configuration

Current chart configuration and functionality with respect to chart type (Bar, Line and Pie) are retained as is except for changes to the chart wizard is toolbar and Chart dropdown field is that all the configurations with respect to current chart is accessible from the buttons placed next to charts dropdown
Toolbar
image
Chart field
image
In order of the buttons placed

  • Edit chart name
  • Apply filter to current chart (Hidden when chart type is Multi chart)
  • Add new chart (Let’s user to select a layer and a new chart is created)
  • Delete a current chart

2. Multi chart type

A new chart type is introduced to handle multivariable chart configuration. User will be able to select a new chart type called ‘Multi chart’

  • Upon selecting the chart type Multi chart
  • The wizard presents user with Traces, traces options and advanced options specific to trace
    Traces
    Traces are meaningful grouping of data for the chart. Each trace corresponds to a layer.
    image
    In order of the buttons placed
    • Edit trace name
    • Apply filter to current trace(layer)
    • Add new trace (Let’s user to select a layer and a new trace is created)
    • Delete a current trace or layer (Disabled when trace is not more than 1)

Trace options
Trace options are specific configuration applicable for the trace
image
Template (hovertemplate) properties of yaxis (suffix, prefix, format and formula) are used to format value to be present on the tooltip

Advanced Options
image
Tick format properties of yaxis (suffix, prefix, format and formula) are used used to format value to be present on yaxis

2.1 Multiple trace - Different trace type
When more than one trace is present, the user can configure each trace with a chart type from the trace type field in trace option
Example

Trace 1 -> Bar chart
Trace 2 -> Line chart

2.2 Multiple trace - Y axis
Enabled when more than one trace is present, the user can configure yaxis specific configuration

  • Title of the yaxis
  • Title font color
  • Anchor (x | free)
    • Free - When anchoring to axis the position slider is enabled; Position slider lets the user to position yaxis on the chart between (0 and 1). 0 - left most value and 1-right most value
    • x - Default anchoring
  • Side (Positioning of the title around the yaxis)
    image

2.3 Multiple trace - Template
User can configure template of yaxis per trace using the following configuration options from trace option

  • Prefix, format and suffix - Used on hover box
  • Formula used on yaxis data
    image

2.4 Multiple trace - X attributes
On Multi chart type, the x attributes should have the same domain. Hence the user can add layers which are similar or layers with similar attributes. If an invalid layer is selected a similar error message is displayed on layer selector
image

2.5 Multiple trace - Delete trace

  • When user deletes a trace, the trace information is removed and chart is updated accordingly
  • When user deletes trace(s) resulting in only one trace, the delete button on trace is disabled

2.6 Multiple trace - Changing chart type
When user changes the chart type from Multi chart to predefined chart type (Bar or Line)

  • When only one trace is present, the chart data is retained during the type change and the traces and trace specific options are hidden (Traces, trace type and template)

    • Ex: One trace with trace type as Line/Bar, the user changes the chart type to Line/Bar/Pie, the data is retained and the chart preview is updated
  • When multiple traces are present, changing chart type the data is not retained. And should warn the user about the data loss

2.7 Multiple trace - Filter
Filter is applied per trace. Dependencies to other widgets is to be managed based on the filter/quickfilter accordingly

Mockup
image

⚠️ Note

The Multi chart type is available and configurable only in the Dashboard widgets for now. Support for in Map viewer will be a future enhancement.
To make this new feature available also in map viewer it is necessary to change the current behavior of layer association from TOC selection or allow to select (eg. from a drop down) additional layers (from the ones available in TOC) in the wizard.

@dsuren1 dsuren1 self-assigned this Nov 2, 2022
@tdipisa tdipisa added the inbox label Dec 19, 2022
@tdipisa tdipisa assigned tdipisa and unassigned dsuren1 Apr 4, 2023
@tdipisa tdipisa assigned MV88 and dsuren1 and unassigned MV88 and tdipisa Aug 21, 2023
@tdipisa tdipisa added this to the 2024.01.00 milestone Aug 21, 2023
@tdipisa tdipisa removed the inbox label Sep 5, 2023
@tdipisa tdipisa assigned allyoucanmap and unassigned dsuren1 Sep 29, 2023
allyoucanmap added a commit to allyoucanmap/MapStore2 that referenced this issue Oct 24, 2023
@tdipisa tdipisa linked a pull request Oct 24, 2023 that will close this issue
5 tasks
offtherailz pushed a commit that referenced this issue Oct 27, 2023
@ElenaGallo ElenaGallo assigned dsuren1 and ElenaGallo and unassigned dsuren1 Oct 27, 2023
allyoucanmap added a commit to allyoucanmap/MapStore2 that referenced this issue Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment