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/05/20 20:47:17 UTC

[GitHub] [superset] lfkpoa opened a new issue, #20150: Sunburst is not using linear color scheme when secondary metric is provided

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

   The sunburst chart allows to provide the primary metric and a secondary metric.
   On Customize it is possible to choose a color scheme and a linear color scheme.
   The hint on linear color scheme is "When a secondary metric is provided, a linear color scale is used.".
   However, the linear color scheme is never used, even if I provide the second metric.
   It is not possible to unselect or clear the color scheme.
   
   Sunburst.js (line 492) tests the condition to set colorByCategory to false when the secondary metric is provided and is diferente than the primary metric.
   However, it also checks if the colorScheme was not provided:
   ```
   if (metrics[0] !== metrics[1] && metrics[1] && !colorScheme ) {
   ```
   But colorScheme is always present since there is no way to clear it.
   I tried commenting the !colorScheme test and the chart seemed to work properly.
   It used the linear color scheme correctly when I provided the secondary metric and used de color scheme by category otherwise.
   
   ### Expected results
   
   I expected that the linear color scheme would be used instead of the color scheme based on categories.
   
   ### Actual results
   
   It keeps using the color scheme based on categories even when the secondary metric is used.
   
   I'm running docker-compose up based on main branch.
   
   ### 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.
   
   ### Additional context
   
   


-- 
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] stephenLYZ closed issue #20150: Sunburst is not using linear color scheme when secondary metric is provided

Posted by GitBox <gi...@apache.org>.
stephenLYZ closed issue #20150: Sunburst is not using linear color scheme when secondary metric is provided
URL: https://github.com/apache/superset/issues/20150


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