Replies: 1 comment 4 replies
-
I worked on something like this that we will announce in a few weeks. I would be happy to share some code there if needed. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It would be nice to have a
normalize
function similar to https://github.com/jkroso/normalize-svg-path/tree/master that Redash was using. The idea behind this is to be able to use Svg Path generated by d3 by converting them usingSkia.Path.MakeFromSVGString(svgPath).toCmds()
into Cubic commands.Using svg and reanimated, I've been using the following function to generate my graphs (like here https://github.com/Andarius/rn-animations-playground#8-scalable-linechart):
So we use the power of d3 to generate the graphs.
Before, I was using parse from redash to then convert it to be used to get the Y value of the graph.
With the new way of doing it in
react-native-skia
,selectCurve
only supports Move and Cubic PathVerb.I created the following
norm
function but I'm not an expert in Bézier curves so I might be wrong and it only supports convertion of Line commands.It could be nice to have something built-in.
Beta Was this translation helpful? Give feedback.
All reactions