Module: GenericSideEffect

This is the base class of all side effects. It contains all common methods like setting configuration, disabling, enabling side effect, etc. Every new side effect has to inherit this class or SpawnableSideEffect or SurrogateSideEffect class. All side effects are initialized by firebolt. The instance of firebolt is passed on initialization. The firebolt instance contains ```context``` which is the instance of visual unit with which the firebolt is attached.
Source:

Methods

(static) defaultConfig() → {Object}

Returns the default configuration of the side effect.
Source:
Returns:
Default configuration of side effect.
Type
Object

(static) formalName() → {string}

Returns the formal name of a side effect. This method must be implemented by all side effects which changes or adds any element in the visualization.
Source:
Returns:
Formal name of side effect.
Type
string

(static) mutates() → {boolean}

Returns true if the side effects mutates the data of chart.
Source:
Returns:
If the side effect mutates the data of chart.
Type
boolean

addStrategy(name, fn) → {GenericSideEffect}

Adds a new strategy method for this side effect. The strategy method is implemented by side effect class.
Parameters:
Name Type Description
name string Name of the strategy.
fn function Strategy method.
Source:
Returns:
Instance of side effect.
Type
GenericSideEffect

apply(selectionSet, payload, options)

Applies the interaction effect on the chart. This is where the implemntation of the side effect is defined.
Parameters:
Name Type Description
selectionSet Object Contains the entry and exit set of data which got affected during interaction.
Properties
Name Type Description
mergedEnter Object Combined previous entry and new entry set.
Properties
Name Type Description
model DataModel Instance of data model containing all rows which got affected during interaction.
uids Array Ids of all rows which were affected during interaction.
mergedExit Object Combined previous exit and new exit set.
Properties
Name Type Description
model DataModel Instance of data model containing rows which were not affected during interaction.
uids Array Ids of all rows which were not affected during interaction.
entrySet Object Entry set information.
entrySet[0].uids Array All row ids which got affected during previous interaction.
entrySet[1].uids Array All row ids which got affected during current interaction.
exitSet[0].uids Array All row ids which were not affected during previous interaction.
exitSet[1].uids Array All row ids which were not affected during current interaction.
payload Object Payload information of the behavioural action on trigger of which this side effect is applied.
options Object Optional information for side effect like strategy, etc.
Source:

config(config) → {GenericSideEffect|Object}

Sets or gets the configuration of side effect. When setter,
Parameters:
Name Type Description
config Object Configuration of side effect.
Source:
Returns:
  • Side effect instance. When getter,
    Type
    GenericSideEffect
  • Side effect configuration.
    Type
    Object