fix: gradient for color thresholds - #1361
Open
fran68 wants to merge 2 commits into
Open
Conversation
fran68
force-pushed
the
dev-fix/gradient_for_color_thresholds
branch
from
April 21, 2026 21:14
da5a819 to
16b2e31
Compare
fran68
force-pushed
the
dev-fix/gradient_for_color_thresholds
branch
from
May 4, 2026 19:47
16b2e31 to
47aabd5
Compare
fran68
force-pushed
the
dev-fix/gradient_for_color_thresholds
branch
from
May 11, 2026 20:59
47aabd5 to
fc1a471
Compare
Collaborator
|
@fran68 Here:
What do you think? Also, I am a bit unsure about may be an offset should be 100? |
fran68
force-pushed
the
dev-fix/gradient_for_color_thresholds
branch
from
July 24, 2026 15:05
fc1a471 to
52934d7
Compare
Author
|
@ildar170975 But I dont know how to deal with that logarithmic thing. Is there ever a scale value which is negative? |
fran68
force-pushed
the
dev-fix/gradient_for_color_thresholds
branch
from
July 24, 2026 16:57
7535bd5 to
b4c7d3b
Compare
Collaborator
|
We can discuss it in our chat. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
IMO this should fix the problem with the color thresholds. In function computeGradient in src/graph.js the thresholds are evaluated as real values. When displaying the graph the gradient course is distorted since the margins at top and bottom affect the gradient offset. So the offset of the gradient needs to be adapted by considering the margin.
This might fix
#1080
#1108
#1137
#723
Before:


After applying the patch:

