Suboptimal Color Selection in Data Visualization
Describe the bug The random color selection for data visualization doesn't provide an optimal user experience, especially when displaying multiple categories. Colors may not sufficiently differ, leading to confusion in interpreting the visualization.
To Reproduce:
- Access a dataset with multiple entries (e.g., https://test.visualize.admin.ch/create/GnuwGnO1Iu5K?dataSource=Test)
- Choose segmentation with "Warenkorb Nummer"
- Select all top-level entries (1-13)
- Remove all entries except two with the same color
- Apply the filter
- Observe the resulting visualization with two categories in the same color
Expected behavior
- When there are fewer categories than color values in the palette, Visualize should automatically assign distinct colors to each category.
- The "shuffle colors" function should ensure unique colors for each category when possible.
- Color palettes should offer more options for better differentiation.
Actual Behavior
- The same colors may be selected for different categories, even with only two categories in the visualization.
- The "shuffle colors" function doesn't always resolve color conflicts.
Screenshots or video
Environment:
- Visualize version: Test v4.7.4 (also reproducible in production)
- Browser: Brave v1.69.153
Additional context
- Expanding the color palette options would generally improve visualization capabilities.
- This issue impacts the clarity and effectiveness of data presentations, especially in scenarios with multiple data segments.
Hi @timvonfelten, Thank you for your feedback. We're currently working on improving the color selection for charts. We'll provide an update on these improvements soon.
Hi @timvonfelten
I am happy to inform you that we have improved the color selection for charts. As a chart editor you can now choose the color you would like to apply via a color picker.
https://github.com/user-attachments/assets/e4d32208-4b90-4a88-bb79-6bf71a17b864
cc: @KerstinFaye