Subscription - kroim/charting-library-wiki GitHub Wiki
Subscription object is returned by Chart Methods. This object allows you to subscribe and unsubscribe to a chart event. It has two methods:
subscribe(object, method, singleshot)
objectis a context to be used asthispointer for themethodfunction. Usenullif you don't need the context.methodis a function to be called when the event happens.singleshotis an optional argument. Set it totrueif you wish to be unsubscribed automatically when the event happens for the first time.
unsubscribe(object, method)
Use the same object and method that you used in the subscribe function to unsubscribe from the event.
unsubscribeAll(object)
Use the same object that you used in subscribe function to unsubscribe object from all events.