Stock Chart

A stock chart, also known as an open-hi-low-close (OHLC) chart, displays four different measures, “low,” “high,” “opening,” and “closing,” and is most often used to plot trading information. A stock chart is functionally the same as a Candle Chart.

What is a measure?

A measure is generally used for aggregation, for example summation, averaging, correlation, etc., within a Crosstab, Chart, Text component, or Gauge. Adding a measure to the ‘Y’ region in a chart displays the computed aggregates by using locations on the Y-axis. Adding a measure to the ‘X’ region displays the computed aggregates by using locations on the X-axis. You can also display aggregates by using color, shape, size, or label.

stockChartExp4

To create a stock chart that displays the averaged high, low, opening, and closing prices by week, follow the steps below:

The ‘customers’ Data Worksheet can be found in Data Worksheet  Sample Queries. You may need to download the examples.zip file from GitHub into your environment. (This requires access to Enterprise Manager.) See Import and Export Assets for instructions on how to import.

If you are new to charting, see the following sections first:

Configure Your Data…​

The data source for the chart (data block or data model) should represent dimensions and measures as independent columns or fields, as shown below. See Prepare Your Data for information on how to manipulate your data, if it is not currently in this form. (Note: A properly designed data model will already have the correct structure.)

dataStructureCharts

In some cases (e.g., Pie Chart), you may want your data to provide just a single measure. In other cases (e.g., Line Chart), you may want the data to supply multiple measures. If the data does not provide the correct number of measures, you may be able to alter the number of measures to suit the needs of the chart by “pivoting” or “unpivoting” the data. See Pivot Data in Prepare Your Data for more information about this procedure.

Open a Chart for Editing…​
Watch Video: Create a Chart (Open the Chart Editor)

This video might show an earlier version of the feature or operation that differs in minor ways from the current version.

Follow the steps below to get started with a new Chart. See Basic Charting Steps for more details.

  1. If necessary, create a new Dashboard. (See Create a New Dashboard.)

  2. From the Toolbox panel, drag a Chart component into the Dashboard.

    addingChart

  3. Resize the Chart as desired by dragging the handles.

    resizeChartHandle 1

  4. Press the ’Edit’ button in the center of the Chart or press the ‘Edit’ button edit in the top-right corner.

    ChartEditButton

    This opens the same Visualization Recommender available for creating a new Dashboard. (See Create a New Dashboard.)

  5. To bypass the Recommender, press the ‘Full Editor’ button edit at the top right to open the Chart Editor.

    ChartEditorIntro

  1. Press the ‘Select Chart Style’ button auto chart type. Choose the ‘Stock’ style. Press the ‘Apply’ button submit.

    stockChartExp1

    Note that the Chart Editor now provides binding regions for ‘High’, ‘Close’, ‘Open’, and ‘Low’.

    CandleChartType2

  2. Drag a dimension from the ‘Dimensions’ folder of the Data Source panel to the ‘X’ region. For a stock chart, the dimension is usually a date field.

    What is a dimension?

    A dimension is used to break-down the dataset into multiple groups, often within a Crosstab, Chart, or Selection List. Adding a dimension to the ‘X’ region of a Chart distinguishes the different dimension groups by location on the X-axis. Adding a dimension to the ‘Y’ region distinguishes the different dimension groups by location on the Y-axis. You can add multiple dimensions into the ‘X’ or ‘Y’ regions of a Chart, or into the ‘Rows’ or ‘Columns’ regions of a Crosstab, to create multiple grouping levels. You can also distinguish groups in a dimension by using color, shape, size, or label in a Chart.

    stockChartExp3

    To convert a measure to a dimension, right-click the measure in the data source and select ‘Convert to Dimension’.
  3. Press the ‘Edit Dimension’ button dimension setting next to the field name in the Chart Editor, and set the ‘Level’ to the desired date grouping. Then press the ‘Apply’ button submit.

    CandleChartType3

  4. Optional: You can add additional dimensions to the Chart if desired. See Trellis Chart (Grid) for information about adding multiple dimensions to a chart axis.

  5. Drag the high, close, open, and low measures from the data source to the appropriate regions, as shown below.

    stockChartExp2

  6. Press the ‘Edit Measure’ button measure setting next to the High field, and choose ‘Max’ from the ‘Aggregate’ menu. Press the ‘Apply’ button submit. Press the ‘Edit Measure’ button measure setting next to the Low field, and choose ‘Min’ from the ‘Aggregate’ menu. Press the ‘Apply’ button submit.

    Report CandleChartType7

  7. Press the ‘Edit Measure’ button measure setting next to the Close field. Choose ‘Last’ from the ‘Aggregate’ menu and choose your ‘X’ field (e.g., ‘Date’) from the ‘By’ menu. Press the ‘Apply’ button submit. Press the ‘Edit Measure’ button measure setting next to the Open field. Choose ‘First’ from the ‘Aggregate’ menu and choose your ‘X’ field (e.g., ‘Date’) from the ‘By’ menu. Press the ‘Apply’ button submit.

    Report CandleChartType7b

  8. Press the ‘Finish’ button submit to close the Editor.

    CandleChartType5

  9. To observe the structure of the chart more closely, use the ‘Zoom Chart’ button zoom in to view a more limited date range. (See Drill Down into Data for more information.)

    stockChartExp4

    Note that for each week, the values of each of the measures have been independently aggregated as specified by the ‘Aggregate’ property you set for each measure. The “high” and “low” measures are represented by the extremes of the vertical line, and the “open” and “close” measures are represented, respectively, by the left and right horizontal lines.

You can proceed to edit the titles, legend, etc. See Basic Charting Steps and Chart Properties for more information. See Add Data Format for information on how to format text on a Chart.