-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
add relative gradient option to the baseline series #1730
Conversation
size-limit report 📦
|
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.
I think we should add this option to the area series as well.
Additionally, could you check the behaviour when you have more than one series on the same price scale?
because there would be two ways to implement this feature:
- Consider the min and max visible values of items (like this PR)
- Use the min and max values from the scale margins
For a single series (and the price scale not adjusted) then the visible range and the scale margins range would essentially be the same and unchanging (and quicker to calculate).
However for multiple series, this wouldn't be the case. So please try these different setups and comment on how they look.
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.
I have a concern that there are graphics tests (which haven't been changed) are failing for the area series. Could you please investigate why the area series is rendering differently in these cases. The opacity seems to be different.
@SlicedSilver fixed area gradient. and two tests that should fail are passing. Looks like our screenshot comparison can't identify such small changes in color with opacity |
Perhaps we should adjust this value to be more accurate?
|
@SlicedSilver When I lowered the threshold random tests were failing, I tried to with a few different values and didn't find one that can detect gradient changes and not fail random tests, so I left the default value |
@illetid This PR is still approved. So if you want to merge then go ahead 👍 |
Type of PR: enhancement
PR checklist:
Overview of change:
Added a new option to the baseline series where we calculate gradient from the visible points range and not from the top and bottom of the chart.
Example with two series with the same settings. Top and bottom colors are different without option enabled
without option:
with the option enabled: