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

Gradient not applying correctly #139

Closed
geobotsar81 opened this issue Sep 13, 2021 · 2 comments
Closed

Gradient not applying correctly #139

geobotsar81 opened this issue Sep 13, 2021 · 2 comments
Labels
question Further information is requested

Comments

@geobotsar81
Copy link

Seems like the gradient is not applying correctly.
Instead of applying the 100% offset to the end of the circle(100%) it seems to be applied at 50% and then the colors repeat in inverse for the other half:

For example green is applied to 0% orange to 50% and red to 100%.
image

Below you can see that red is applied to the 50% and then the colors repeat from 50% to 100% in inverse

image

@setaman
Copy link
Owner

setaman commented Sep 13, 2021

Hello @geobotsar81

i think, what are you trying to achieve is the green-orange-red gradient to follow along with the progress line, this could be possibly with the conical gradient (see #107 ).

What you observe is a linear gradient from bottom to top and this is the currently available behavior of SVG gradients in modern browsers. It becomes more clear with thicker lines like in this example. So far I haven't found a simple and elegant way to implement canonical gradients. I am open for any suggestions.

If you want to communicate the progress visually with colors. the work around could be just to change the progress line color depending on the progress value.

@setaman setaman added the question Further information is requested label Sep 13, 2021
@geobotsar81
Copy link
Author

Thanks, that makes sense, wasnt aware of these limitations. Thanks for the suggestion, will give it a go!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants