Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

to_data() method of Graph Gives Incorrect Results #10

Open
DaytonaJohn opened this issue Sep 18, 2017 · 0 comments
Open

to_data() method of Graph Gives Incorrect Results #10

DaytonaJohn opened this issue Sep 18, 2017 · 0 comments

Comments

@DaytonaJohn
Copy link

I want to do some interacting with a plot. If the Graph widget is positioned in a layout at other than pos_hint = ('x': 0, 'y':0), then the to_data() method gives incorrect results. Also, the collide_plot() method gives incorrect results under the same circumstances. To reproduce, use the code in the below zip file and left click anywhere in the plot. If you click on the center of the plot(50,0), here is the output:

got a touch: <MouseMotionEvent spos=(0.5675, 0.5316666666666667) pos=(454.0, 319.00000000000006)>
graph.view_size = (658.0, 535.0)
graph.view_pos = (45.0, 51.0)
collide = True
point is at [62.1580547112462, 0.0018691588785049174]

I believe that the point output above should be close to (50,0). This works perfectly if the graph is located in the FloaLlayout at x=0, y=0.

Other than this bug, This is working great, thanks!!

bug.zip

@matham matham transferred this issue from kivy-garden/garden.graph Jun 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant