This event has three attributes; the unique ID of the Wave asset on which to apply the filter, the payload, and the asset type (currently only dashboard). The payload is a JSON string that identifies the datasets, and any dimensions and field values.
In this example, the Lightning component has already been defined, handlers have been set, and the update event has been registered in the custom component markup. The controller code below shows how to construct the payload for the update event—in this case, setting StageName to Close Won in the oppty_test dashboard.
({ doInit: function(component, event, helper) { component.set('v.filter', '{"oppty_test": {"StageName": ["Closed Won"]}}'); }, handleSendFilter: function(component, event, helper) { var filter = component.get('v.filter'); var dashboardId = component.get('v.dashboardId'); var evt = $A.get('e.wave:update); evt.setParams({ id: dashboardId, value: filter, Type: "dashboard" }); evt.fire(); } })
Attribute Name | Type | Description |
---|---|---|
id | String | The unique identifier of the Wave asset, in the form of a standard 18-character ID. |
value | String | The JSON representing the filter or selection to be applied to the asset. |
type | String | The type of the Wave asset. Currently, only dashboard is supported. |