Class: c3.Dispatch

Defined in: js/c3.coffee

Overview

A mixin to add support for registering and triggering events

Instance Method Summary

Constructor Details

# (void) constructor()

Instance Method Details

# (void) on(event, handler)

Register an event handler to catch events fired by the visualization. Multiple handlers can be set by specifying a namespace for the event name like event.namespace Remove a handler by passing null for the handler

Parameters:

  • event ( String ) The name of the event to handle. See the Exetensibility and Events section for c3.Base.
  • handler ( Function ) Callback function called with the event. The arguments passed to the function are event-specific.

# (void) trigger(event, args...)

Trigger an event for this visualization. Do not specify a namespace here.

Parameters:

  • event ( String ) Name of event to trigger.
  • args ( arguments ) Additional arguments are passed as arguments to the handler

    Quickly fuzzy find classes, mixins, methods, file:

    Control the navigation frame:

    You can focus and blur the search input: