Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running out of category colors #56

Open
AtomicMaya opened this issue Oct 7, 2021 · 2 comments
Open

Running out of category colors #56

AtomicMaya opened this issue Oct 7, 2021 · 2 comments
Labels
Bug Something isn't working

Comments

@AtomicMaya
Copy link

Describe the bug
If you have more than 10 challenge categories, the pie chart runs out of colors.

To Reproduce
Steps to reproduce the behavior:

  1. Create 11 categories
  2. Go to Admin/Statistics
  3. Check Challenges/Category
  4. See error

Expected behavior
Every category should have a color

Screenshots
image

@thebeanogamer thebeanogamer transferred this issue from ractf/core Oct 23, 2021
@NicholasG04
Copy link
Member

https://github.com/ractf/ui-kit/blob/572429458c336d03273e4e20cc154389f873cf7f/components/charts/common.js
Not sure of ideal way to fix this, the colours are hardcoded right now.

@AtomicMaya
Copy link
Author

This could maybe be done by looping on the color array and applying a brightness or darkness color lerp?

eg: [0, ..., 9, darken(0), ...]

@NicholasG04 NicholasG04 added the Bug Something isn't working label Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants