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

Feature Request: clickData Timestamp #650

Closed
SterlingButters opened this issue Mar 14, 2019 · 6 comments
Closed

Feature Request: clickData Timestamp #650

SterlingButters opened this issue Mar 14, 2019 · 6 comments

Comments

@SterlingButters
Copy link

Just read this super in-detail Gist on comparing the clickData property amongst multiple components: https://gist.github.com/shawkinsl/22a0f4e0bf519330b92b7e99b3cfee8a

I found myself in need of this too so I thought I'd suggest a timestamp key in clickData

@alexcjohnson
Copy link
Collaborator

Have you seen dash.callback_context #608? We're hoping this alleviates the need for all of these timestamp properties.

@SterlingButters
Copy link
Author

No I hadn't seen that! Checking it out now!

Does

Just merged, going into next release.

mean dash 0.40.0?

@alexcjohnson
Copy link
Collaborator

In fact it's been released since v0.38
https://github.com/plotly/dash/blob/v0.39.0/CHANGELOG.md#added-1

@SterlingButters
Copy link
Author

SterlingButters commented Mar 14, 2019

I see, so eventually the timestamps for all inputs will be implemented through the callback_context? Because right now

trigger = dash.callback_context.triggered[0]
print(trigger)

returns data that I could still retreive from properties

{'prop_id': 'assembly-graph.clickData', 'value': {'points': [{'curveNumber': 0, 'x': 2, 'y': 10, 'z': 1, 'text': 'Test'}]}}

@alexcjohnson
Copy link
Collaborator

No, the idea of triggered is that if you’re using timestamps (or diffing) to determine which input changed, why don’t we just tell you which one changed? If it’s in triggered, it’s the reason the callback fired. Did you have a different usage of timestamp?

@SterlingButters
Copy link
Author

Brilliant, it makes perfect sense now that you put it like that. This will work perfectly, indeed, thanks!

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

2 participants