Use Data Actions to Connect to Canvases and External URLs and Use in External Containers

A Data Action link can pass context values from Data Visualization as parameters to external URLs, filters to other projects or to visualizations embedded in external containers.

When a link navigates to a project, the data context is displayed in the form of canvas scope filters in the filter bar. The links data context may include attributes associated with the selections or cell from which the link was initiated.

Create Data Actions to Connect Visualization Canvases

You can create data actions to navigate to a canvas in the current project or to a canvas in another project.

You can also use data actions to transfer context-related information (for example, an order number) where the link displays details about an order number in another visualization or project.

  1. Create or open a project and confirm that you’re working in the Visualize canvas.
  2. Click Menu on the project toolbar and click Project Properties, then select the Data Actions tab.
  3. Click Add Action and enter a name for the new navigation link.
    • You can use only letters and numbers in the navigation link’s name.
    • You can add multiple navigation links.
  4. Click the Type field and select Canvas Link.
  5. Click the Anchor To field and select the columns from the current visualization to associate with this data action. Don't select measure columns or hidden columns. If you don't specify a value for the Anchor To field, then the data action applies to all data elements in the visualizations.
  6. Click the Project field and select the project you want to use for the anchor:
    • Use This Project - Select if you want to link to a canvas in the active project.

      Columns that you select must be in the current visualization.

    • Select from Catalog - Select to browse for and select the project that you want to use.
  7. Click the Canvas Link field and select the canvas that you want to use.
  8. Click the Pass Values field and select which values you want the data action to pass.
    For example, if in the Anchor To field, you specified order number column, then in the Pass Values field, select Anchor Data to pass the specified column values.
    • All - Dynamically determines the intersection of the cell that you click and passes those values to the target.
    • Anchor Data - Ensures that the data action is displayed at runtime, but only if the required columns specified in the Anchor To field are available in the view context.
    • None - Opens the page (URL or canvas) but doesn't pass any data.
    • Custom - Enables you to specify a custom set of columns to pass.
  9. Click OK to save.

Create Data Actions to Connect to External URLs from Visualization Canvases

You can use data actions to navigate to an external URL from a canvas so that when you select a column such as the supplier ID, it displays a specific external website.

  1. Create or open a project and confirm that you’re working in the Visualize canvas.
  2. Click Menu on the project toolbar and click Project Properties, then select the Data Actions tab.
  3. Click Add Action and enter a name for the new navigation link.

    You can add multiple navigation links.

  4. Click the Type field and select URL Navigation.
  5. Click the Anchor To field and select the columns that you want the URL to apply to. If you don't specify a value for the Anchor To field, then the data action applies to all data elements in the visualizations.
  6. Enter a URL address and optionally include notation and parameters.

    For example, where http://www.example.com?q=${keyValuesForColumn:"COLUMN"} is displayed like www.oracle.com?q=${keyValuesForColumn:"Sales"."Products"."Brand"} The column names that you select here are replaced with values when you invoke the data action.

  7. Click OK to save.
  8. In the Canvas, click a cell, or use Ctrl-click to select multiple cells.
  9. Right-click and select from the menu the navigation name that you created earlier.
    Selecting the cells determines the values to pass to the parameters (that is, the URL tokens).

Create Data Actions to Connect to REST APIs from Visualization Canvases

You can use HTTP API data actions in a canvas so that when you select a column, it sends the value to a REST API which returns a response from the external website.

  1. Create or open a project and confirm that you’re working in the Visualize area.
  2. Click Menu on the project toolbar and click Project Properties, then select the Data Actions tab.
  3. Click Add Action and enter a name for the new HTTP API data action. For example, enter HTTP API Example.

    You can add multiple HTTP API data actions.

  4. Click the Type field and select HTTP API.
  5. Click the Anchor To field and select the columns that you want the HTTP API data action to apply to. Don't select measure columns or hidden columns. If you don't specify a value for the Anchor To field, then the data action applies to all data elements in the visualizations.
  6. Click the HTTP Method field and select an appropriate value (that is, GET, POST, PUT, DELETE) to send to the REST API.
  7. Enter the URL for the REST API that starts with http or https and optionally includes replacement tokens.

    Replacement tokens in the URL pass contextual values to a data action (for example, data values, user name, project path, canvas name).

    For example, you can pass a column value (for example, a value for the Category column) to a REST API (for example, the Google books API) using: http://www.googleapis.com/books/v1/volumes?q=${valuesForColumn:"Category"} The value that you select from a cell in the Category column (for example, "Books") passes to the REST API.

  8. If you selected the POST method, a field is displayed where you enter each parameter on a separate line.

    You enter each parameter as a name-value pair with the name and value separated by "=". You can use the same URL token syntax in the name-value pairs as required by the API that you're calling.

    For example:

    • paramName1=paramValue1
    • paramName2=${valuesForColumn:"Product"}
  9. Click OK to save.
  10. Click a data point in the visualization.

    For example, you might select "Books" from the Category column.

  11. Right-click and select HTTP API Example to display the result.
    The selected data-points determine which values to pass to the URL tokens.
    A success or failure message is displayed confirming the REST API has been successfully invoked using the selected value.

Invoke Data Actions from Visualization Canvases

You can invoke data actions from a canvas to other canvases and URLs.

  1. Create or open a project. Confirm that you’re working in the Visualize canvas.
  2. On the canvas that contains a Data Action link leading to another canvas or URL, perform the following steps:
    1. Right-click a data element, or select multiple elements (using Ctrl-click).
    2. Select Data Actions from the context menu.
    3. Complete the Project Properties dialog.
    The name of the data actions that apply in the current view context are displayed in the context menu.
    All the values defined in the Anchor To field must be available in the view context in order for a data action to be displayed in the context menu.
    The following rules apply to matching data elements passed as values with data elements on the target canvas:
    • If the same data element is matched in the target project's canvas, and if the target canvas doesn't have an existing canvas filter for the data element, a new canvas filter is added. If there is an existing canvas filter, it’s replaced by the value from the source project's canvas.

    • If the expected data set is unavailable but a different data set is available, the match is made by using the column name and data type in the different data set, and the filter is added to that.

    • If there are multiple column matches by name and data type, then the filter is added to all those columns in the target project or canvas.

    The data action navigates to the target cell or URL that is mapped and filters the data displayed based on the values specified in the Data Actions dialog.

    The Pass Values context, set in the Pass Values field, consists of data elements used in the visualization from which the data action is invoked. The Pass Values context doesn't include data elements in the project, canvas, or visualization level filters.