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: [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]