You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "vddavydova (via GitHub)" <gi...@apache.org> on 2025/03/25 05:55:04 UTC
[I] Duplicate measures appear when switching between chart types [superset]
vddavydova opened a new issue, #32835:
URL: https://github.com/apache/superset/issues/32835
### Bug description
### Description:
When switching between different chart types in Superset, duplicate measures are added unexpectedly. This issue occurs specifically when switching between a Line Chart and a Waterfall Chart.
### Steps to reproduce:
1. Create a Line Chart and set up the X-Axis and a Measure (e.g., `SUM(goods_services_export)`).

2. Change the chart type to Waterfall Chart. The selected measure is sometimes removed.

3. Re-add the same measure (`SUM(goods_services_export)`) and build the chart successfully.

4. Switch the chart type back to Line Chart. Now, the measure appears twice in the settings.

5. If you continue switching between chart types (Line Chart → Waterfall Chart → Line Chart), new duplicate measures keep appearing.

### Expected behavior:
Switching between chart types should not result in duplicate measures. The selected measures should persist without being reset or duplicated.
### Actual behavior:
- Measures are removed when switching to a Waterfall Chart.
- When switching back to a Line Chart, the measure is duplicated.
- Repeating the switch process keeps adding more duplicates.
### Environment:
- Database backend: ClickHouse
### Possible Cause:
It seems like the UI is not correctly handling measure persistence when switching chart types. Measures might not be properly reset or are being re-added instead of being retained.
### Additional context:
This issue happens inconsistently, but once it starts, it continues with every switch between chart types.
### Screenshots/recordings
_No response_
### Superset version
4.1.1
### Python version
I don't know
### Node version
I don't know
### Browser
Chrome
### Additional context
_No response_
### Checklist
- [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
--
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: notifications-unsubscribe@superset.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Duplicate measures appear when switching between chart types [superset]
Posted by "LisaHusband (via GitHub)" <gi...@apache.org>.
LisaHusband commented on issue #32835:
URL: https://github.com/apache/superset/issues/32835#issuecomment-3119086071
When the metric in the waterfall chart differs from the metrics used in the line chart, no duplication or increase occurs. Generally speaking, when switching between the waterfall chart and the line chart, metric changes will only focus on the first metric — this happens after applying the changes in my PR. And I believe it should be this way, because we only pass the first metric to the waterfall chart (as it is restricted to accept only one metric). Given the current design philosophy — where metric and other form data are globally shared — I believe this is the best approach.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Duplicate measures appear when switching between chart types [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #32835:
URL: https://github.com/apache/superset/issues/32835#issuecomment-2750170340
<!-- Answer -->
The issue you're experiencing with duplicate measures appearing when switching between chart types in Superset seems to be related to how the frontend handles measure persistence. Unfortunately, I couldn't find specific information in the repository about how Superset manages state for chart configurations or any known issues related to this behavior in version 4.1.1.
However, Superset's frontend differentiates between chart types using plugins configured with unique keys for each visualization type. Each plugin is responsible for the specific configuration and rendering logic of its associated chart type <sup>[[1]](https://github.com/apache/superset/blob/master/superset-frontend/src/visualizations/presets/MainPreset.js)</sup>. This might be where the issue arises, as the state management for measures might not be correctly handled when switching between incompatible chart types like Line Chart and Waterfall Chart.
To address this issue, you might want to investigate the frontend code responsible for managing chart configurations and see if there are any discrepancies in how measures are reset or duplicated when switching chart types. Additionally, checking for any recent updates or patches in the Superset repository that might address this issue could be helpful.
<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
---
<sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/48ed727d-b046-4ebe-beb3-6bcc8c29307a?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/48ed727d-b046-4ebe-beb3-6bcc8c29307a?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/48ed727d-b046-4ebe-beb3-6bcc8c29307a?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/48ed727d-b046-4ebe-beb3-6bcc8c29307a?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/48ed727d-b046-4ebe-beb3-6bcc8c29307a?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/48ed727d-b046-4ebe-beb3-6bcc8c29307a?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/48ed727d-b046-4ebe-beb3-6bcc8c29307a?feedback_type=other)</sup>
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Duplicate measures appear when switching between chart types [superset]
Posted by "LisaHusband (via GitHub)" <gi...@apache.org>.
LisaHusband commented on issue #32835:
URL: https://github.com/apache/superset/issues/32835#issuecomment-3096269175
This bug is not just happening between the waterfall chart and the line chart, but between the waterfall chart and almost every other chart. The logic implementation of this waterfall chart is definitely problematic, it's like a virus, it's so fascinating. 😄
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Duplicate measures appear when switching between chart types [superset]
Posted by "msyavuz (via GitHub)" <gi...@apache.org>.
msyavuz commented on issue #32835:
URL: https://github.com/apache/superset/issues/32835#issuecomment-3118437453
When going back from waterfall to line chart, should line chart have one metric coming from waterfall or should it keep previous metrics as well?
@rusackas
https://github.com/user-attachments/assets/89b113e6-f1f1-4682-8254-49651eb7edfb
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Duplicate measures appear when switching between chart types [superset]
Posted by "LisaHusband (via GitHub)" <gi...@apache.org>.
LisaHusband commented on issue #32835:
URL: https://github.com/apache/superset/issues/32835#issuecomment-3118610536
However, after conducting a test, I found that this issue shouldn't be considered a problem. This is because the first metric attribute of the line chart is passed in as the metric for the waterfall chart, and the waterfall chart then modifies this metric. The change in the waterfall chart affects the first metric of the line chart. As for the duplicate values shown in the test video, this happens because the modified metric in the waterfall chart happens to be the same as the second metric of the line chart. Therefore, when the change in the waterfall chart is mapped to the line chart, it results in the duplication of the metric as described in the issue.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Duplicate measures appear when switching between chart types [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #32835:
URL: https://github.com/apache/superset/issues/32835#issuecomment-5086734281
This still repros on `master`, and #34250 got closed without landing. The metric dedup on chart-type switch is still worth fixing if anyone wants a fresh crack at it.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Duplicate measures appear when switching between chart types [superset]
Posted by "hainenber (via GitHub)" <gi...@apache.org>.
hainenber commented on issue #32835:
URL: https://github.com/apache/superset/issues/32835#issuecomment-2761166682
I can confirm this is reproducible in latest `master` branch.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Duplicate measures appear when switching between chart types [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #32835: Duplicate measures appear when switching between chart types
URL: https://github.com/apache/superset/issues/32835
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Duplicate measures appear when switching between chart types [superset]
Posted by "LisaHusband (via GitHub)" <gi...@apache.org>.
LisaHusband commented on issue #32835:
URL: https://github.com/apache/superset/issues/32835#issuecomment-3118774196
[Test Video already upload to google drive, and shared by this link](https://drive.google.com/file/d/1plohBc_qJaOsNqBdV2cDHeKGUqjffZTc/view?usp=sharing)
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Duplicate measures appear when switching between chart types [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #32835:
URL: https://github.com/apache/superset/issues/32835#issuecomment-3006512569
This is indeed still happening.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Duplicate measures appear when switching between chart types [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #32835:
URL: https://github.com/apache/superset/issues/32835#issuecomment-4035397129
This validated bug — duplicate metrics appearing when switching between chart types (e.g., waterfall to line) — continues to be reproduced. The issue is in how metric arrays are merged during chart type transitions. PRs to fix the metric deduplication logic during chart type switching are welcome.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org