-
Notifications
You must be signed in to change notification settings - Fork 15
Use reduced palettes #258
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
Use reduced palettes #258
Conversation
@ricardobaeta There is no branding in this PR, but I also added you as a reviewer to confirm that it makes sense to have this kind of reduced palettes on charts showing only a few different metrics. |
This adds a bit of "complexity" when users create a chart, right? Instead of choosing the sourced palette, now you have to be careful to choose a palette that contains enough colors for the data you are representing.
What if we changed the code where the colors are assigned to make it deterministic? Can this be done? It would make the dashboard consistent no matter the number of colors in the palette, which I think is desirable.
This can be interesting indeed, but if we had deterministic colors assigned, we would not need reduced palettes. We could have different full sourced palettes that could apply to any chart. |
I completely agree with @carlosms. Also, what would happen if we choose a palette with fewer colors than those required? In case that the alternative solution of changing the color assignment is too complex I'd add already all the |
377a547
to
b1bf0e9
Compare
I rebased over current code, so now the commit introduced by this PR is only the last one:
I also rewrote the PR description in a way that I think that it answers your (totally reasonable) questions: TL;TRIs it reasonable to think that we can have a way to control how the way that colors are assigned, not based on its order, but in any kind of priorities based on, e.g. the different amount of data being displayed? |
b1bf0e9
to
99a91be
Compare
I've kind of lost the conversation after editing the original description. If On the other hand I'll trust whatever @ricardobaeta prefers on this topic. |
My point is that a palette containing 16 colors (to be applied sequentially) may not order them using the same priority that if they were being used for a chart using only 2 colors. But again. This is only a RFC, trying to help @ricardobaeta when he's creating our official palette. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work ✨
Use palettes with less colors in charts that does not require many different colors Signed-off-by: David Pordomingo <David.Pordomingo.F@gmail.com>
99a91be
to
8a56b03
Compare
Rebased over @ricardobaeta palette, already merged. Some clarifications from the discussion above:
If you @src-d/applications do not have any strong opinion against this, we could merge this to be released on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Changelog at #280(suggestion) |
depends on #257
depends on #259
This PR proposes simpler palettes on charts displaying only a few different data.
e.g. when showing only merged vs unmerged, it's only needed two colors, and it might be interesting to use a different palette.
Description of the problem
Let's consider this palette
greenDark, green, greenLight, redDark, red, redLight
which produces nice shades of colors and relations when applied to many data (which will cause circular repetition if not enough colors compared with the amount of data to represent).But what if the same palette is assigned to a chart representing only these 2 items
passed, failed
?With current code, colors are randomly assigned, so there is no control about which will be assigned.
Assuming that we can control the color assignment (which can be wrong considering [1] [2] [3]), let's consider that the definition order will be kept.
Then, in that example chosen colors will be
greenDark, green
, but it would be way better if it would begreen, red
, closer to which the data represents.proposed solution:
Choose better palettes when different metrics are less dense.
pros:
cons:
Palettes Changes
On overview dashboard:
srcdDuo
srcdDuo
srcdDuo
srcdDuo
On collaboration dashboard:
srcdSix
srcdDuo
srcdDuo