You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi everyone. Might be a noob question but I am confused as to how rotation works for Visx gradients. I have tried looking everywhere but couldn't find any good explanation for it.
the expected results should be "ALL WHITE" gradient since we asked for the to color (white) to start from 0% offset.
You can confirm the same from the Codesandbox.
CASE B -
rotate={-45}
fromOffset={"0%"}
toOffset={"0%"}
However for this case, when we rotate by -45, it is as follows.
Can anybody explain why is this the case and around what point does the gradient rotates. I want an exact 45-degree rotation of the gradient both clockwise and anti-clockwise where both the colors are 50%-50% mixed in the middle.
Also how the x0,y0 and x1,y1 works as well as they also don't seem too reliable.
This discussion was converted from issue #1157 on August 17, 2021 20:30.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi everyone. Might be a noob question but I am confused as to how rotation works for Visx gradients. I have tried looking everywhere but couldn't find any good explanation for it.
For example, if you look into this Codesandbox - https://codesandbox.io/s/bold-wildflower-q3i1i?file=/Example.tsx
CASE A -
rotate={0}
fromOffset={"0%"}
toOffset={"0%"}
the expected results should be "ALL WHITE" gradient since we asked for the to color (white) to start from 0% offset.
You can confirm the same from the Codesandbox.
CASE B -
rotate={-45}
fromOffset={"0%"}
toOffset={"0%"}
However for this case, when we rotate by -45, it is as follows.
Can anybody explain why is this the case and around what point does the gradient rotates. I want an exact 45-degree rotation of the gradient both clockwise and anti-clockwise where both the colors are 50%-50% mixed in the middle.
Also how the x0,y0 and x1,y1 works as well as they also don't seem too reliable.
Beta Was this translation helpful? Give feedback.
All reactions