-
Notifications
You must be signed in to change notification settings - Fork 246
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
fix: use d3 to interpolate colors #1118
Conversation
now for real... This reverts commit c872c02.
where computeColor was used. Which does not interpolate.but uses the same logic otherwise. rename intCOlor to computeColor for consitency
and delete our own nterpolation, as this was the last usage of it
I went for interpolating bar colors, too. It just doesn't make sense to not do it. This changes appearance of colored bars. But I consider it a fix. The old behaviour can be restored by setting |
@ildar170975, could you please double-check that this behavior is as expected? |
@akloeckner |
Don't hurry. I just noticed it was next week. ;-)
|
Yes, any of the two dist* files should be ok. They are just compiled with different Node.js versions. |
Test 1:
With attributes - colors are also OK (do not bother about absence of graphs since these "master" sensors are excluded from Recorder): Imho we can merge this & allow other people to test. |
Perfect. Let's do this then! Thanks for checking.
This sounds like an exciting life. Or an exhausting one. :-) |
## [0.12.2-dev.2](v0.12.2-dev.1...v0.12.2-dev.2) (2024-08-07) ### Bug Fixes * use d3 to interpolate colors ([#1118](#1118)) ([b8676f5](b8676f5))
🎉 This PR is included in version 0.12.2-dev.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This uses
d3-interpolate
to interpolate between two colors in the thresholds. The library can handle all sorts of color inputs, most importantly named colors. Our old implementation could only interpolate hexadecimal color values.The following features now use the
d3
interpolation (and should thus be fixed):This also extends usage of color interpolation (to elements not interpolating at all before):
Old (wrong though explicit) behaviour of bars can be restored by setting
color_thresholds_transition: hard
.fixes #1116