You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/07/26 00:15:45 UTC

[GitHub] [superset] ktmud opened a new issue, #20860: [Chart] Toggling legends in Stacked Bar Chart v2 does not update total values

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

   Time-series Bar Chart v2 does not update total values for stacked bar chart when toggling legends.
   
   #### How to reproduce the bug
   
   1. Create a "Time-series Bar Chart v2"
   2. Go to "Customize" and select "Show value", "Stack series" and "Only total"
   3. Toggle series in legends
   4. The total value should update but it doesn't
   
   The legacy Time-series Bar Chart does not have this issue.
   
   #### Screenshots
   
   https://user-images.githubusercontent.com/335541/180895670-3420b152-2422-4195-8ca2-888a4c6c9347.mp4
   
   
   ### Environment
   
   Latest master
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
   - [x] I have reproduced the issue with at least the latest released version of superset.
   - [x] I have checked the issue tracker for the same issue and I haven't found one similar.
   


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


[GitHub] [superset] TonyBhargav commented on issue #20860: [Chart] Toggling legends in Stacked Bar Chart v2 does not update total values

Posted by "TonyBhargav (via GitHub)" <gi...@apache.org>.
TonyBhargav commented on issue #20860:
URL: https://github.com/apache/superset/issues/20860#issuecomment-1399404022

   @ktmud @RaymondBakerIBM If no one is assigned to this issue or no one is working on this issue, I would like to work on this.


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


[GitHub] [superset] RaymondBakerIBM commented on issue #20860: [Chart] Toggling legends in Stacked Bar Chart v2 does not update total values

Posted by GitBox <gi...@apache.org>.
RaymondBakerIBM commented on issue #20860:
URL: https://github.com/apache/superset/issues/20860#issuecomment-1276745527

   Hi I've investigated this bug, from what I can tell there's no way to fix this without waiting for echarts to add the total value bar functionality or making our own legend 
   
   Since legend selection is handled by echarts the only way for superset to know what is selected is the `legendselectchanged` callback. This gets called after the label formatters get called. Causing issues with both useRef and useState solns.
   
   
   In both the below I was overloading the label formatter for each series.
   
   I tried using a react State in the formatter to hold the selected legend values, this caused the graph to render twice undoing the hidden bar in the process. Once before and once after the value update
   
   I also tried using a react Ref in the formatter this cased the number to not reflect the actual data selected because `legendselectchanged` gets called after the label formatters. 
   
   I think one other option is to give EchartsTimeseries a way to give the newly selected legends to transformers.ts causing a redraw but with the current SuperChartCore.tsx I don't see a way to do that


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


[GitHub] [superset] michael-s-molina closed issue #20860: [Chart] Toggling legends in Stacked Bar Chart v2 does not update total values

Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina closed issue #20860: [Chart] Toggling legends in Stacked Bar Chart v2 does not update total values
URL: https://github.com/apache/superset/issues/20860


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


[GitHub] [superset] michael-s-molina commented on issue #20860: [Chart] Toggling legends in Stacked Bar Chart v2 does not update total values

Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on issue #20860:
URL: https://github.com/apache/superset/issues/20860#issuecomment-1611784690

   Fixed by https://github.com/apache/superset/pull/24477


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