Before you Begin

This tutorial shows you how to create a bar visualization and add a category reference line using a date column.

Background

Oracle Analytics creates a vertical line or vertical band reference when you choose a category column. You can change the reference line's properties such as line pattern, color, and line type. You can change the properties for measure reference lines as well.

Oracle Analytics uses horizontal reference lines with measure columns.

What Do You Need?

Create a Dataset

In this section, you add the sample_order_lines2023.xlsx file to Oracle Analytics to create a dataset table.

  1. Sign in to Oracle Analytics.
  2. On the Home page, click Create, and then click Dataset.
  3. In Create Dataset, click Drop data file here or click to browse, select the sample_order_lines2023.xlsx file, and then click Open.
  4. In Create Dataset Table from sample_order_lines2023.xlsx, click OK.


    Description of sample_order_lines2023_ds.png follows
    Description of the illustration sample_order_lines2023_ds.png
  5. Click Save Save icon. In Save Dataset As, enter sample_order_lines2023, and then click OK.

Create a Bar Visualization

In this section, you create a workbook and add a visualization using a measure, Quantity Ordered, and Ship Date.

  1. Click Create Workbook.
  2. In the Data Data panel icon panel, drag Ship Date to the canvas.


    Oracle Analytics creates a single column table visualization.

  3. In the Data panel, drag Quantity Ordered to the canvas.


    Oracle Analytics adds a column to the table for the Quantity Ordered data.

    Description of qnty_ord_ship_date_table.png follows
    Description of the illustration qnty_ord_ship_date_table.png
  4. Click Change Visualization Type Change Visualization Type icon and select Bar Bar icon.


    The table visualization changes to a bar visualization.

    Description of bar_vis.png follows
    Description of the illustration bar_vis.png
  5. Click Save Save icon. In Save Workbook, enter qnty_ordered_ship_date_wbk in Name, and click Save.

Add Date Filters

In this section, you add filters to refine the visualization to a period of interest.

  1. In the Data Data panel icon panel, expand Ship Date, and drag Ship Date (Year) to the filter bar.
  2. In the Ship Date (Year) filter, click 2022 and then click outside the dialog.


    Description of year_filter.png follows
    Description of the illustration year_filter.png
  3. In the Data Data panel icon panel under Ship Date, drag Ship Date (Month) to the filter bar.
  4. In the Ship Date (Month) filter, click July and then click outside the dialog.


    Description of month_filter.png follows
    Description of the illustration month_filter.png

Add a Category Reference Line

In this section, you add a reference line to the visualization using the Ship Date column.

  1. Click Properties Properties icon.
  2. In Properties, click Analytics Analytics icon, click Add Statistics Add statistics icon, and then select Reference Line.


    Oracle Analytics creates a horizontal reference line using the Quantity Ordered measure in the visualization.

    Description of default_measure_ref_line.png follows
    Description of the illustration default_measure_ref_line.png
  3. In the Column row, click Quantity Ordered and select Ship Date.
  4. In the Value row, click the Calendar Calendar icon and click July 1.


    The reference line changes to a vertical line using the July 1, 2022 ship date.

    Description of ship_date_ref_line.png follows
    Description of the illustration ship_date_ref_line.png

Change the Reference Line's Properties

In this section, you modify the reference line's color, pattern, and line type.

  1. In Reference properties, click the box Color box icon in the Color row. Click a color in the scale, select a hue, and then click OK.


    The color yellow, #f7f110, provides a good contrast to the visualization's bar color. Your bar visualization might use a different color.

    Description of color_picker.png follows
    Description of the illustration color_picker.png
  2. Click Dotted in the Pattern row and select Dashed.


    Description of modified_ref_line.png follows
    Description of the illustration modified_ref_line.png
  3. Click Line in the Type row and select Band.
  4. Click Calendar Calendar icon in the From field and click July 1. Click Calendar Calendar icon in the in the Until field and click July 16.


    Description of band_line_type.png follows
    Description of the illustration band_line_type.png
  5. Click Save Save icon.

Learn More