Set JavaScript callbacks for various dygraph events. See the dygraph options reference for additional details on the signature of each callback.
dyCallbacks(dygraph, clickCallback = NULL, drawCallback = NULL,
highlightCallback = NULL, pointClickCallback = NULL,
underlayCallback = NULL, unhighlightCallback = NULL,
zoomCallback = NULL, drawHighlightPointCallback = NULL,
drawPointCallback = NULL, annotationClickHandler = NULL,
annotationMouseOverHandler = NULL, annotationMouseOutHandler = NULL,
annotationDblClickHandler = NULL)
Dygraph to add callbacks to
A function to call when the canvas is clicked.
When set, this callback gets called every time the dygraph is drawn. This includes the initial draw, after zooming and repeatedly while panning.
When set, this callback gets called every time a new point is highlighted.
A function to call when a data point is clicked. and the point that was clicked.
When set, this callback gets called before the chart is drawn.
When set, this callback gets called every time the user stops highlighting any point by mousing out of the graph.
A function to call when the zoom window is changed (either by zooming in or out).
Draw a custom item when a point is highlighted. Default is a small dot matching the series color. This method should constrain drawing to within pointSize pixels from (cx, cy)
Draw a custom item when drawPoints is enabled. Default is a small dot matching the series color. This method should constrain drawing to within pointSize pixels from (cx, cy).
JavaScript function to call when an annotation is clicked. This can also be specified on a per-annotation basis.
JavaScript function to call when the mouse hovers over an annotation. This can also be specified on a per-annotation basis.
JavaScript function to call when the mouse exits an annotation. This can also be specified on a per-annotation basis.
JavaScript function to call when an annotation is double clicked. This can also be specified on a per-annotation basis.
Dygraph with callbacks