-
Select
cross-link icon on the dashboard icon bar. The Dashboard Interactions dialog appears. In the following image, no cross-source links are defined for the dashboard.

-
Select the Cross-Visual Filtering tab.

-
Select a visual in the Visuals list on the left of the tab. The right side of the tab show the link filters available to be published in the Published filters table.

- If you want to publish all of the links available for the visual, slide the Enable All switch on (to the right). If you just want to publish an individual link, locate the link name in the table of Published filters, and slide its corresponding switch in the Enabled column on. Repeat this for every individual link you want published.
- When you have finished identifying the published links for a visual, select Apply.
- Optionally, repeat Steps 3 through 5 for other visuals listed on the left of the tab. Remember to select Apply after each update or the link settings for a visual will not be stored.
- Save the dashboard to save the cross-visual link specifications.
Mute a Published Link
For each visual in a dashboard, you can mute (disable) cross-source and same-source links for the dashboard. When they are muted, they can no longer be used by the visual to create cross-visual filters. You can mute links from the Dashboard Interactions dialog. You can also revoke (undo) published links from the visual itself. See Revoke a Published Link. Mute a same-source or cross-source link from the Dashboard Interactions dialog-
Select
cross-link icon on the dashboard icon bar. The Dashboard Interactions dialog appears. In the following image, no cross-source links are defined for the dashboard.

-
Select the Cross-Visual Filtering tab.

-
Select a visual in the Visuals list on the left of the tab. The right side of the tab show the link filters available to be published in the Published filters table.

- If you want to mute all of the links available for the visual, slide the Enable All switch off (to the left). It no longer is blue. If you just want to mute an individual link, locate the link name in the table of Published filters, and slide its corresponding switch in the Enabled column off. Repeat this for every individual link you want muted.
- Optionally, repeat Steps 3 and 4 for other visuals listed on the left of the tab.
- When you have finished muting the links, select Apply.
- Save the dashboard to save the cross-visual link specifications.
Revoke a Published Link
You can revoke (undo) published links from the visual itself. This does not mute the published link, but simply removes its application from the dashboard visuals. You can also mute a published link using the Data Interactions dialog. See Mute a Published Link. Revoke a published same-source or cross-source link from the dashboard visual-
Select
dashboard interaction icon on the visual. A drop-down dialog appears for the visual, listing all of the links resulting in published filters for the other visuals on the dashboard.

-
Select the remove icon
next to the link you want to revoke or select the remove icon
next to Remove All to revoke all the links published by the visual.
The links are revoked and all filters applied by the links are removed.
- Save the dashboard to save the cross-visual link specifications.
Subscribe a Visual to a Link
You can select cross-source and same-source links to which a visual on a dashboard should subscribe (use). When a visual subscribes to a link, the visual will be filtered by the link field if another visual creates a cross-visual filter for the same field. Subscribe to a same-source or cross-source link for a dashboard visual-
Select the link icon
on the dashboard icon bar. The Dashboard Interactions dialog appears. In the following image, no cross-source links are defined for the dashboard.

-
Select the Cross-Visual Filtering tab.

-
Select a visual in the Visuals list on the left of the tab. The right side of the tab show the link filters to which the visual can subscribe in the Subscribed filters table.

- If you want the visual to subscribe to all of the links available, slide the Enable All switch on (to the right). If you just want the visual to subscribe to an individual link, locate the link name in the table of Subscribed filters, and slide its corresponding switch in the Enabled on. Repeat this for every individual link to which you want the visual subscribed.
- Optionally, repeat Steps 3 and 4 for other visuals listed on the left of the tab.
- When you have finished identifying the subscribed links, select Apply.
- Save the dashboard to save the cross-visual link specifications.
Mute a Subscribed Link for a Visual
You can mute (disable) cross-source and same-source links that you do not want a visual on a dashboard to subscribe (use). When a visual mutes a link subscription, the visual can no longer be filtered by the link field if another visual creates a cross-visual filter for it. Mute to a same-source or cross-source link for a dashboard visual-
Select the link icon
on the dashboard icon bar. The Dashboard Interactions dialog appears. In the following image, no cross-source links are defined for the dashboard.

-
Select the Cross-Visual Filtering tab.

-
Select a visual in the Visuals list on the left of the tab. The right side of the tab show the link filters to which the visual can subscribe in the Subscribed filters table.

- If you want the visual to mute all of the links available, slide the Enable All switch off (to the left). It no longer is blue. If you just want the visual to mute an individual link, locate the link name in the table of Subscribed filters, and slide its corresponding switch in the Enabled off. Repeat this for every individual link you want muted.
- Optionally, repeat Steps 3 and 4 for other visuals listed on the left of the tab.
- When you have finished muting the links, select Apply.
- Save the dashboard to save the cross-visual link specifications.
Publish Custom Cross-Visual Filters
You can build and enable your own custom cross-visual filters. An example is provided below.If you use date-time fields in your custom cross-visual filters, they must be in the format required by Self-Service Analytics. See Date-Time Formats in Cross-Visual Filters for information on the required date-time format and an example for how to convert your data to the required format.
publish method publishes a message (filter) for a specific cross-source or same-source link (channel). Publishing a link filter causes any subscribing handlers for the link to be called and passed the filter message. There is no registration process for a link, simply call the publish method with a link name and it will be created. No value is returned.
| Property/Object | Description |
|---|---|
<linkName> | The link (channel) name. Link names can be custom names, specified when a cross-source link is created, or names in the format <source-name>.<field-name>, automatically generated for every field in a data source for same-source links.The link name is defined when you define a cross-source link. See Define Cross-Source Links. It is published for use by a dashboard as a cross-visual filter. See Publish a Link. The link name represents the channel into which the message should be published. It is typically called a topic in standard publish/subscribe systems. Type: string |
<message> | The message sent with the link. The message published can either be an arbitrary object or null. An object published to a link channel is not restricted to any particular structure but a Self-Service Analytics dashboard only recognizes messages in the structure described in Published Cross-Visual JavaScript Message Structure. Publishing a null message can clear the last published message from the channel. If the last published message’s publisherId matches the null message’s publisherId, the last message is removed from the channel and subscribers receive a null message. If the publisherId of the last published message on the channel does not match the null message’s publisherId, nothing happens.The most recently published message on each channel is stored and sent to new subscribers at the time of subscription. Type: object or null |
<options> | Options for how the link should be applied. All values are optional. Options include:
Type: object |
| Property | Description |
|---|---|
type: 'selection' | Only a value of selection is supported at this time, identifying a selection of values on a visual or widget. This signifies that the message is a SelectionMessage.Type: string |
valueType: 'NUMBER' | Identifies the type of value being selected. The following value types are supported:
Type: string |
ranges | An array of selected ranges. The set of allowed operations depends on the specified valueType. Currently only a single range is supported per message (filter). Ranges after the first range will be ignored. Ranges should be structured as follows:The operation and value properties are described next.Type: array |
operation: 'EQUALS' | The filter operation. Supported operations include:
Type: string |
value: '6' | Provide a value as described for each filter operation.Type: string, number, array<string | number | null> |
Subscribe to a Cross-Visual Filter
When a visual subscribes to a cross-visual filter, the visual is filtered by the link field in the filter if another visual creates a cross-visual filter for the same field. When a visual publishes a link, that visual can apply cross-visual filters using the link field to other dashboard visuals that have subscribed to the link. Cross-visual filters can only be applied if the associated link is published. In addition, they can only be applied using the Filter option on the context menu. The following example shows how to subscribe to a cross-visual filter:The subscribe Method
The subscribe method attaches a subscription handler to a cross-source or same-source link (filter). Each time a new cross-visual filter is published to the link, the subscription handler is called and passed the newly published filter.
When you call the subscribe method, the unsubscribe function is returned. Run the unsubscribe function to remove the handler for the link. This guarantees that the handler will no longer be notified when new messages are published for the link.
Messages passed on the channel can be an arbitrary message object or null. Because the message objects are not restricted, the subscription handler should never assume its structure and always check that the message is in the structure the handler is expecting.
Messages that are null are interpreted as a clearing of the channel and should be handled by undoing any actions taken based on the last messages received by the handler. For example, when a visual receives a null message in its filtering logic, it removes any filters created by previous messages on the given channel (link).
If a message is published to the channel before the subscribe method is called, the subscription handler is executed immediately with the latest message that was published on the channel.
The subscribe Properties
The properties for the subscribe method of the Zoomdata class are described in the following table.
| Property/Object | Description |
|---|---|
<linkName> | The link (channel) name to which the subscription handler should subscribe. The link name is defined when you define a cross-source link. See Define Cross-Source Links. It is published for use by a dashboard as a cross-visual filter. See Publish a Link. The link name represents the channel from which the message should be subscribed. It is typically called a topic in standard publish/subscribe systems. Type: string |
subscriptionHandler | The handler that will be called upon new messages. This handler will be provided with the published message as the first argument and the ID of the publisher as the second argument. Type: function |
Custom Chart Support for Cross-Visual Links and Filters
Thecmp-chart CLI supports the ability to publish and subscribe to cross-visual links. To implement publish/subscribe cross-visual filtering for custom charts, use the CLI to edit your charts and enable the controls for publish and subscribe. See Step 4. Enable Cross-Visual Filtering.
Publish should only be enabled if the custom chart uses the context menu and filtering.
- When a custom chart has the Filter option in its context menu, same-source links appear in the Published filters and Subscribed filters sections of the tab.
- When a custom chart does not have the Filter option in its context menu, same-source links appear in the Subscribed filters section of the tab, but no Published filters section is shown.
- When two custom charts using different data sources are added to the dashboard and a cross-source link is added between their data sources, the cross-source link appears in the Published filters section for the chart that can publish the link (the chart using the first data source in the cross-source link) only. However, the cross-source link appears in the Subscribed filters section for both charts.
-
Cross-visual filters are automatically applied to custom charts when they are added to a dashboard, in the following circumstances.
- When two custom charts using the same data source are added to the dashboard, a cross-visual filter specified for the same-source link field on one custom chart is automatically applied to the other custom chart.
- When two custom charts using different data sources are added to the dashboard and a cross-source link is added between their data sources, a cross-visual filter specified for the cross-source link field on one custom chart is automatically applied to the other custom chart.