Creating basic combos

CDP Data Visualization enables you to create Combined Bar/Line (Combo) visuals.

The following steps demonstrate how to create a new combined bar and line chart .

For an overview of shelves that specify this visual, see Shelves for combos.

  1. Start a new visual based on the World Life Expectancy dataset.
    For instructions, see Creating a visual.
  2. In the VISUALS menu, find and click Combined Bar/Line.

    The shelves of the visual changed.

    The mandatory shelf for Combined Bar/Line visuals is Dimension that maps to the X-axis.

    Bar Measure and Line Measure both map to the Y-axis.

  3. Populate the shelves from the available fields (Dimensions, Measures) in the DATA menu.
    1. Under Dimensions, select year and drag it to the Dimension shelf.
    2. Under Measures, select life_expectancy and drag it to the Bar Measures shelf.
    3. Under Measures, select gdp_per_capita and drag it to the Line Measures shelf.
  4. Change the aggregate of the life_expectancy field from sum(life_expectancy) to avg(life_expectancy):
    1. Click the life_expectancy field to open the FIELD PROPERTIES menu.
    2. Select Aggregates > Average.
    3. Click the x icon at the top of the FIELD PROPERTIES menu to close it.
  5. Similarly, change the aggregate of the gdp_per_capita field from sum(gdp_per_capita) to avg(gdp_per_capita):
    1. Click the gdp_per_capita field to open the FIELD PROPERTIES menu.
    2. Select Aggregates > Average.
    3. Click the x icon at the top of the FIELD PROPERTIES menu to close it.
    The shelves of your visual should now look similar to the following image:
  6. Click REFRESH VISUAL.

    The combined bar and line visual appears.

    The two legends for the Y axis match the color of the plot: the orange line represents sum(gdp_per_capita) and the blue bars represent avg(life_expectancy). However, you may not be able to see the bars because the values of that measure are much smaller than the values for the line measure. To see the bars, assign a measure to a secondary axis.

  7. Alias the life_expectancy field as Life Expectancy, and the gdp_per-capita field as GDP Per Capita:
    1. Click the fields to open the FIELD PROPERTIES menu.
    2. Select Alias and enter the alias name of the column in the text box as it should appear in the visual.
    3. Click the x icon at the top of the FIELD PROPERTIES menu to close it.
  8. Click REFRESH VISUAL again.