Before You Begin

This tutorial shows you how to create legend visualizations in an Oracle Analytics workbook.

Background

When you add a visualization to a canvas, Oracle Analytics includes a legend as a guide in most visualization types. Oracle Analytics doesn't automatically add legends to table and pivot visualizations.

If a workbook has multiple visualizations, the legends can obscure the data in the visualization or show only a portion of the legend. You can add a legend visualization to the canvas to include the data elements portrayed in the individual visualization legends. After creating a legend visualization, you can remove the individual legends from the other visualization.

When creating a legend visualization, select the common data elements in the visualizations' legend to use in the legend visualization.

What Do You Need?

Import a Workbook

In this section, you import an Oracle Analytics workbook to learn the steps to add a legend visualization.

  1. Sign in to Oracle Analytics.
  2. On the Home page, click Page Menu page menu icon and select Import Workbook/Flow.
  3. In Import Workbook/Flow, click Select File. In File Upload, select sample_vis_wbk.dva, click Open, and then click Import.
  4. When the message Import successful appears, click OK.
  5. On the Home page, hover over sample_vis_wbk, click Actions actions menu icon and then select Open.


    Description of workbook_prvw.png follows
    Description of the illustration workbook_prvw.png

Add a Legend Visualization

In this section, you add a legend visualization to the workbook.

  1. Click Edit Edit workbook icon.
  2. In the workbook, click Visualizations Visualizations pane icon.
  3. In the Visualizations pane, select Legend Legend vis icon and release it on the canvas when the green vertical line appears on the left side of the visualizations.


    You can place the legend on the canvas in the location most appropriate for your workbook.

    Description of legend_vis_in_wbk.png follows
    Description of the illustration legend_vis_in_wbk.png

Add Data Elements to the Legend

In this section, you add the data elements used in the individual legends to consolidate the information.

The Order Priority attribute is a common data element in three of the four visualizations in the workbook. Quantity Orders, # of Orders, and Sales measures also appear in the visualization legends.

  1. Click Data Data pane icon. In the Data pane, expand sample_order_lines dataset. Select and drag Order Priority to Color in the Grammar pane.
  2. In the Data pane, hold down the Ctrl key, select and drag Sales and # of Orders to Values in the Grammar pane.
  3. In the Data pane, select Quantity Ordered and drag it to Size in the Grammar pane.


    The Quantity Ordered legend appears in the # of Orders by Sales visualization and the Sankey chart which shows the Product Category, Ship Mode, and Order Priority data elements.

    Description of legend_data_elements.png follows
    Description of the illustration legend_data_elements.png
  4. Click the Sales by Customer Segment overlay chart. Click Properties properties icon. In Auto in the Legend Position row and select None.
  5. Click the # of Orders by Sales scatter visualization. Click Properties properties icon. In Auto in the Legend Position row and select None.
  6. Click the Product Category, Ship Mode, Order Priority Sankey Chart. Click Properties properties icon. In Auto in the Legend Position row and select None.
  7. Click the Top 10 City by Sales bar visualization. Click Properties properties icon. In Auto in the Legend Position row and select None.


    Description of ind_legends_removed.png follows
    Description of the illustration ind_legends_removed.png

Add a Second Legend Visualization

In this section, you add a legend for the visualization with one common data element.

  1. Click Visualizations visualizations icon.
  2. In the Visualizations pane, select Legend Legend vis icon and release it on the canvas when the green vertical line appearsbelow the legend visualization.
  3. Click Data data pane icon. In the Data pane, select and drag Sales to Size in the Grammar pane of the empty legend visualization.


    Description of second_legend_sales.png follows
    Description of the illustration second_legend_sales.png
  4. Click Properties properties icon. In Properties under Style, click None in the Border row and select Round.
  5. In the Shadow row, click None and select Top left.
  6. Click the first legend. Click Properties properties icon. In Properties under Style, click None in the Border row and select Round.
  7. In the Shadow row, click None and select Top left.


    Description of formatted_legends_wbk.png follows
    Description of the illustration formatted_legends_wbk.png
  8. Click Save.

Learn More