Skip to content

Fix language pie chart colors overlapping/repeating#135

Open
yusufemreboyraz wants to merge 1 commit into
tipsy:masterfrom
yusufemreboyraz:fix-language-pie-chart-colors
Open

Fix language pie chart colors overlapping/repeating#135
yusufemreboyraz wants to merge 1 commit into
tipsy:masterfrom
yusufemreboyraz:fix-language-pie-chart-colors

Conversation

@yusufemreboyraz

Copy link
Copy Markdown

Summary

  • Replaces the fixed 6-color palette in createColorArray with golden-angle (137.508°) HSL hue steps.
  • Fixes two issues raised in Pie Chart Colour Schema Not Accurate  #119: green/teal/blue sat too close together and were hard to tell apart, and colors repeated once a profile had more than 6 languages.
  • Scales to any number of languages with no repeats and even perceptual spacing, regardless of how many are shown.

Test plan

  • Rendered isolated doughnut charts with 6 and 12 mock languages using the same color-generation logic, confirmed all slices are visually distinct with no repeats.
  • Maintainer to confirm on a real profile with many languages.

Fixes #119

Fixed 6-color palette repeated after 6 languages and put similar
hues (green/teal/blue) next to each other, making languages hard
to tell apart on the language pie charts. Golden-angle hue steps
scale to any number of languages with no repeats and even
perceptual spacing.

Fixes tipsy#119
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pie Chart Colour Schema Not Accurate

1 participant