Psyduck100 opened a new issue, #45503:
URL: https://github.com/apache/superset/issues/45503

   *Please make sure you are familiar with the SIP process documented*
   [here](https://github.com/apache/superset/issues/5602). The SIP will be 
numbered by a committer upon acceptance.
   
   ## [SIP] Proposal for combining selected legend series into one summed 
series in Timeseries charts
   
   ### Motivation
   
   Discussion [#24233](https://github.com/apache/superset/discussions/24233) 
asks for a way to select several lines in a Timeseries chart and combine them 
into one line that is their sum like Tableau
   
   RIght now a user has to add a calculated column, which is a bit tediuos and 
works poorly when the series come from a dynamic dimension bc the series names 
are not known when the chart is built 
([see](https://github.com/apache/superset/discussions/24233#discussioncomment-6163443)).
 This would be a temp user level view
   
   The ECharts canvas legend can only toggle single series and cannot hold 
multi-select states, a "Combine" button, or a name field. However, the HTML 
legend added in [#43314](https://github.com/apache/superset/pull/43314) can. 
   
   This SIP will only cover support for that existing HTML legend. Although in 
[#45490](https://github.com/apache/superset/issues/45490), it is proposed that 
the other Timeseries legends (Scroll, and Left/Right) are moved to HTML. Once 
those are HTML this feature can be extended to them. For now though, this SIP 
is only scoped to the exisitng HTML legend.
   
   ### Proposed Change
   
   **Overview**
   
   Let users select multiple series in the HTML legend and combine them into 
one series.
   
   Add a **"Combine"** option directly to the HTML Timeseries legend.
   
   **Combining Series**
   
   Combining is available from the legend on Timeseries charts that use the 
HTML legend and supports the following actions:
   
   1. **Select**
   
      Ctrl/Cmd-click, or tick the checkboxes, to select two or more series.
   
   2. **Combine**
   
      Adds a new series, **"Combined (A + B)"**, representing the sum of the 
selected series at each corresponding x-axis value.
   
      - Option to hide the original series and display only the combined series.
   
   3. **Ungroup**
   
      Removes the combined series and restores the original series.
   
   **Note:** Combined series are temporary and are not saved to the chart or 
dashboard.
   
   **Supported Chart Types**
   
   - **Initial scope:** Line, Area, Bar
   - **Potential extensions, depending on implementation complexity:** Mixed 
Time-series, Scatter
   ### New or Changed Public Interfaces
   
   - No new REST endpoints, models, CLI changes, or deployment changes
   - No new form data fields or control panel controls
   
   ### New dependencies
   
   None. 
   
   ### Migration Plan and Compatibility
   
   No database migration is needed bc combined groups are not stored so there 
are no saved charts
   
   ### Rejected Alternatives
   
   N/A


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to