You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** * Default interation model for dygraphs. You can refer to specific elements of * this when constructing your own interaction model, e.g.: * g.updateOptions( { * interactionModel: { * mousedown: DygraphInteraction.defaultInteractionModel.mousedown * } * } ); */
Furthermore, createDragInterface_() calls into addAndTrackEvent(), and there is no way of removing a previously added event callback aside from removing them all with removeTrackedEvents_(); thus calling createDragInterface_() again is unsuitable. That said the event it adds are wrapped (to bind this), so could be extended to act as proxies to the current, uncached interaction model.
The text was updated successfully, but these errors were encountered:
What was expected:
g.updateOptions({ interactionModel: ... })
changesg
's interaction model.What happened: Interaction model stays unchanged.
A comment in
dygraph-interaction-model.js:625-633
suggests that usingg.updateOptions()
to change the currentinteractionModel
is possible:However, dygraphs.js' structure does not allow for the dynamic change of interaction model, as it is set up in
createDragInterface_()
, which is only ever called once, in__init__()
, and not when options are updated.Furthermore,
createDragInterface_()
calls intoaddAndTrackEvent()
, and there is no way of removing a previously added event callback aside from removing them all withremoveTrackedEvents_()
; thus callingcreateDragInterface_()
again is unsuitable. That said the event it adds are wrapped (to bindthis
), so could be extended to act as proxies to the current, uncached interaction model.The text was updated successfully, but these errors were encountered: