rusackas commented on PR #19038:
URL: https://github.com/apache/superset/pull/19038#issuecomment-1108088690

   Heya @clausherther and @serenajiang - thanks for raising your concerns. This 
is an intricate problem, but I'm confident we can find a sensible way forward 
so everyone gets what they want here. There are pros and cons to pretty much 
any approach, which I'll attempt to lay out here.
   
   As a bit of a side note, we sometimes find `label_colors` to be an imperfect 
solution since (a) drill-down/up/across are coming, and across-the-board 
consistency will be of increasing importance, (b) we saw cases where people 
make a particular series a specific color from the palette, and then a 
neighboring line or pie slice was _also_ assigned to be that color, and (c) as 
a feature, it's a little buried and cumbersome in general for wide adoption.
   
   So... i think I see a couple paths forward, with varying levels of 
difficulty. Here goes...
   
   1) Add an app configuration (or dare I say Feature Flag?) for 
`USE_ANALAGOUS_COLORS_IN_DASHBOARDS` which, when enabled, would act as it does 
today. If you turn it off, it would simply loop through the palette colors 
repeatedly. Default of that config is up for debate.
     * `True` would mean it works like it does today, generating colors as 
needed:
       * Upsides:
         * Unique color per-series, meaning there will be fewer issues 
disambiguating charts
         * Features like cross-filters (added support for this nascent feature 
coming soon) and drill-down/up/across will be visually coherent
       * Downsides:
         * Depending on size of dashboard and number of series in it, there may 
be a proliferation of colors
     * `False` would mean the dashbpard cycles repeatedly through the specified 
color palette.
       * Upsides:
         * Only official pallete colors get used
       * Downsides: 
         * You may see the same color multiple times in a chart (depending on 
the number of series in the chart vs the number of colors in the palette
         * A color may be assigned (via `label_coors` or naturally) the 
identical color as its neighbor, causing confusion
         * A given series in a dashbard will have a consistent color, but not a 
unique color, so it may be ambiguous or misleading in some use cases
       
   2) This is a less appealing idea since it has many potential issues, but we 
have heard of use cases for it, so here goes... we _could_ add another 
configuration option for `CONSISTENT_SERIES_COLORS_IN_DASHBOARDS` which 
defaults to `True` to support either of the above treatments. If set to `False` 
however, the dashboard would ignore chart-to-chart consistency entirely, and 
just start at the beginning of the color palette in each chart. Then the first 
color in the palette (sometimes a brand color) is always the first color 
selected for a chart, and thus the dominant color in many dashboards. 
   
   Hope this helps, and hope we can steer this so that everyone wins :D


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

Reply via email to