Skip to main content
Version: 1.0.0

Firebolt

Firebolt is responsible for dispatching behavioural actions when physical actions trigger like mouseclick, mouseover, etc. It also stores the entry and exit set of every behavioural action.

dispatchBehaviour

Syntax: dispatchBehaviour(behaviour, payload)

Dispatches a behavioural action with a payload. It takes the name of the behavioural action and a payload object which contains the criteria and an optional array of side effects which determines what side effects are going to be shown in the canvas. Dispatching a behavioural action also triggers propagation in the DataModel graph.

Parameters:

PropertyTypeRequiredDefaultDescription
behaviourstringtrue-Name of the behavioural action
payloadobjecttrue-Contains information about the identifiers which will be be propagated and what side effects will be shown in canvas.
payload.criteriaobject | Arraytrue-Contains the values of dimensions and range of measures.
payload.sideEffectsArrayfalse-Side effects that will be shown in canvas.

Usage

// Get the firebolt instance of the canvas
const firebolt = canvas.firebolt();

// Dispatch a select behaviour
firebolt.dispatchBehaviour('brush', {
  // Selects all the rows with Acceleration having range between 12 and 14.
  criteria: {
    range: {
      Acceleration: [12, 14]
    }
  }
});

Additionally, it can also be passed an array of side effects in the payload.

Usage

// Dispatch a select behaviour with only tooltip as side effect.
firebolt.dispatchBehaviour('select', {
  criteria: {
    dimensions: {
      Cylinders: ['5']
    }
  },
  sideEffects: ['tooltip']
});

Returns

Instance of Firebolt.