Boris-Em / BEMSimpleLineGraph

Elegant Line Graphs for iOS. (Charting library)
MIT License
2.65k stars 381 forks source link

Get exact y-coordinate of line from pan gesture #240

Open serkanhekimoglu opened 8 years ago

serkanhekimoglu commented 8 years ago

Is it possible to get the Y position of the line when handleGestureAction: is triggered? I've lowered touchInputLine's Y position to use the line under the graphic line with the following:

self.touchInputLine.frame = CGRectMake(translation.x - self.widthTouchInputLine/2, closestDot.frame.origin.y + 10, self.widthTouchInputLine, self.frame.size.height + 1000);

But when I try this, I get the below result. touchInputLine goes over the line graphic. If I find the correct Y position for touchInputLine (which is current Y position of graphic line), touchInputLine will never go up of graphic line and always follow it

screen shot 2015-12-14 at 18 33 44

Sam-Spencer commented 8 years ago

If I understand your question correctly, you'd like to be able to adjust the touch input line's height to match that of the graph's line? That way the touch input line is never higher than the line on the graph?