Reputation: 10713
I'm looking at this formula:
http://www.w3.org/TR/SVG/paths.html#PathDataMovetoCommands
And here is how I draw it:
chart.renderer.path(['M', someNumber, 10, 'V', 1500, 0])
.attr({
'stroke-width': 2,
stroke: 'red',
id: 'vert'
})
.add();
And the line is drawn but it goes through the whole graph. I want it to be small. I think that to make it smaller i need to change the '10' but whatever value I put (even 10.000) the line's length remains the same.
Upvotes: 1
Views: 8071
Reputation: 108537
In the path attribute:
path(['M', someNumber, 10, 'V', 1500, 0])
The 'M' means moveto, "someNumber", 10 are the x, y coordinates you are moving to (this does not draw just moves the "pen" to where you want to start the line). The 'V' means draw a vertical line, the 1500 is the y position to stop drawing it. I do not believe you need the 0 (the V attribute only takes one parameter).
If you want the length of the line to be smaller adjust the 1500 parameter.
Upvotes: 8