Graph manipulation
Hi you there, I'm newbie in svg and I found some problems with a graph that I'm developing.
Here is the code which draws the graph Y and X axis, and 2 vectors, one red (the first one), and the green one(the last one).
Suppose we just have the red one, but later we want to transform the red one into the green one, this means to move the whole red vector one (or n) step(s) behind.
How do I achieve this?? have you any idea? I tried by keeping the vector graph into an array for later manipulation, but the algorithm that I created to process the vector, and transform it into the green one it's not working.
These are the vectors:
path stroke="green" stroke-width="1" fill="none" d="
M0,50
L50,127.5
L83.3333,82.5
L125,175
L166.667,85
L208.333,177.5
L250,170
L291.667,187.5
L333.333,102.5
L375,122.5
L416.667,120"/>
path stroke="red" stroke-width="1" fill="none" d="
M0,217.5
L83.3333,50
L125,127.5
L166.667,82.5
L208.333,175
L250,85
L291.667,177.5
L333.333,170
L375,187.5
L416.667,102.5
L458.333,122.5
L500,120"/>
Post new comment