'Assign a callback to click events propagated
by clicking on point(s) in the Plotly graph.
Args:
callback (function): Callback function this is called
on click events with the signature:
callback(widget, hover_obj) -> None
Args:
widget (GraphWidget): The current instance
of the graph widget that this callback is assigned to.
click_obj (dict): a nested dict that describes
which point(s) were clicked on.
click_obj example:
\'curveNumber\': 1,
\'pointNumber\': 2,
\'x\': 4,
\'y\': 14
remove (bool, optional): If False, attach the callback.
If True, remove the callback. Defaults to False.
Returns:
None
Example:
from IPython.display import display
def message_handler(widget, msg):
display(widget._graph_url)
display(msg)
g = GraphWidget(\'https://plot.ly/~chris/3375\')
display(g)
g.on_click(message_handler)'

def on_click(self, callback, remove=False):

    self._handle_registration('click', callback, remove)
