Dash: Feature Request: clickData Timestamp

Created on 14 Mar 2019  路  6Comments  路  Source: plotly/dash

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

All 6 comments

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

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

Does

Just merged, going into next release.

mean dash 0.40.0?

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

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'}]}}

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

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

Was this page helpful?
0 / 5 - 0 ratings