Communication with Embedded Analytical Designer
Supported events and commands
When you embed Analytical Designer (see Embed Analytical Designer), you can set up receiving messages to your application.
Commands are incoming messages sent from your application to the embedded Analytical Designer to apply actions.
Events are outgoing messages that the embedded Analytical Designer send to you application to notify about the status of commands (for example, success or failure). Events are sent automatically.
ContextId is used to correlate events and commands. It identifies the input and output of the communication.
Events
Event | Event trigger |
---|---|
insightOpened | The insight has been opened.
|
insightChanged | The insight has changed.
|
setFilterContextFinished | A confirmation that the filters that you sent have been applied.
|
filterContextChanged | A set of filters has been changed. Includes the new definitions of all filters that have been changed.
|
Commands
Event | Event trigger |
---|---|
undo | Undo the last action.
|
redo | Applies the next action (if undo has been applied).
|
clear | Removes all items and information from the insight.
Note: This command deletes the complete insight. |
clearInsight | Removes the following items from the insight:
Note: This command deletes only the contents of the insight. When you add new info and save, it is saved as the original insight. |
setFilterContext | Applies a set of filters to the embedded Analytical Designer. You can define, one or more filters in the filter definition. When the received filter configuration is applied, the following happens:
Notes:
Example: Attribute filter - using an identifier
Example: Attribute filter - using URI
Example: Negative attribute filter
Example: Attribute filter with all values
Example: Absolute date filter
Example: Relative date filter You can use the following granularities: GDC.time.week_us, GDC.time.month, GDC.time.year, GDC.time.quarter, GDC.time.date.
Example: All time date filter
Example: Ranking filter Although the ranking filter supports also attributes in Analytical Designer, use only an array with a single attribute local identifier in the postMessage. Sending an empty array results in error. You can getlocalidentifier of metrics and facts from InsightChanged and InsightOpened messages.Note: In the following code sample,
|
removeFilterContext | Removes filters from the embedded Analytical Designer (in edit mode only).
|