Replies: 5 comments 1 reply
-
Might be related to #18392 |
Beta Was this translation helpful? Give feedback.
-
Closing this since it's a question rather than a bug, but you can do this in the dashboard properties editor, assigning colors to series values. Hope that helps a little :) |
Beta Was this translation helpful? Give feedback.
-
Are you sure that this is possible at all? If you know that it can work for dynamic values, please provide documentation or an example. Otherwise, it seems to me you are just closing the issue to keep the count low. @rusackas |
Beta Was this translation helpful? Give feedback.
-
Here is the particular article that probably does what you refer to. Notice how the labels are predefined (static). |
Beta Was this translation helpful? Give feedback.
-
You're right on several counts: However, this is not a bug, but rather a feature request... and a good one at that. Therefore, I'll convert this to a GitHub Discussion, which is where these conversations should land. If you want to contribute to a proposal/implementation of this, that would be appreciated, but it might warrant a SIP depending on the complexity. In my mind, it comes down to one question: Is the main goal to have the pie chart display as a gradient? If so, it seems like making the Pie chart support a linear/gradient palette (by sort order) is a reasonable addition that shouldn't require a SIP. If, however, the proposal is to use categorical palettes in a more deterministic order, that goes counter to the "color consistency" efforts where these charts may be assigned according to dashboard use. That gets exponentially more complex to solve. |
Beta Was this translation helpful? Give feedback.
-
I have a custom color palette that I would like to use to represent different groups in my charts. Here is the palette:
I have values that are dynamically calculated. I would like to assign the first color to the first value, based on some predefined condition. For example, alphabetical order. I have tried achieving this in multiple ways. When it comes to DeckGL graphs, it proved impossible, since the colors are assigned to their corresponding value in some arbitrary way, which is, to my disappointment, not controlled by the order defined in my dataset, created with a custom SQL query. When it comes to a pie chart, you have the option to sort by metric. With some "hacking" of the metric in a way that assigns a number based on the group so that the groups can be sorted in order, I get the desired result:
However, if the metric changes to something meaningful, such as COUNT(*), the colors are still assigned based on the metric, not on my custom order:
Furthermore, even with the first approach, when applying filters, the color order breaks again:
What I would like to have is a precise rule that defines how are the colors assigned. As a matter of fact, if the colors were assigned based on the defined ORDER BY in the SQL code, I would get my desired result. Are there any workarounds to this problem? Is my approach wrong and is there a better one? If not, are there plans to give more freedom when it comes to assigning colors to the charts?
There is also the option to "hardcode" the color from the Dashboard settings. This, unfortunately, will not work in my case, since the groups will change dynamically if, for example, the max value becomes 20.
I see different use cases for this functionality. The two cases I am interested in are:
Beta Was this translation helpful? Give feedback.
All reactions