visualization-tool icon indicating copy to clipboard operation
visualization-tool copied to clipboard

Suboptimal Color Selection in Data Visualization

Open timvonfelten opened this issue 1 year ago • 1 comments

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:

  1. Access a dataset with multiple entries (e.g., https://test.visualize.admin.ch/create/GnuwGnO1Iu5K?dataSource=Test)
  2. Choose segmentation with "Warenkorb Nummer"
  3. Select all top-level entries (1-13)
  4. Remove all entries except two with the same color
  5. Apply the filter
  6. 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 Bildschirmfoto 2024-09-11 um 10 57 13

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.

timvonfelten avatar Sep 11 '24 09:09 timvonfelten

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.

KerstinFaye avatar Sep 11 '24 13:09 KerstinFaye

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

sosiology avatar Feb 20 '25 17:02 sosiology