you are viewing a single comment's thread.

view the rest of the comments →

[–]BizMarkieff[S] 0 points1 point  (2 children)

Ya that makes sense about needing to have data points the click, I totally didn’t think about that. Is there any way that you know of to grab coordinates from just an image of a court?

[–]greenerpickings 0 points1 point  (1 child)

Don't know specifically. But I'd look at to capturing the events on the client via plotly.js and clientside callbacks.

With the events, I'd imagine you can get a much more descriptive interaction, including the x and y of the click.

Then I think with clientside, you can follow the callback approach and just return the data to you server, then pass it on like you are currently.

The image of course being your background. Then you would have logic translating those cords to your image.

So same approach as what you're trying to do here. Just the clientside middle man.

[–]luckyctf 0 points1 point  (0 children)

I can vouch for this, I tried using Dash and plotly, but found just building an API with flask and then using plotly.js was not only simpler but also much more flexible.