Example: creating a clustered bar chart from basic elements

Following are the steps that you would complete to create a clustered bar chart from the basic elements. It is easier to create the same chart from the gallery because the settings in the gallery chart allow you to skip some steps. The example is intended to demonstrate how you use the basic elements if you need to create a chart that doesn't appear in the gallery.

Add the axes and graphic element

  1. Click the Basic Elements tab.
  2. Drag and drop the Bar icon onto the canvas. Adding the graphic element automatically adds a default axis set.

Add the variables

  1. Select a categorical (nominal or ordinal) variable from the Variables list and drag it into the x-axis drop zone. The categories in this variable determine the categories that appear on the x axis. Without clustering, one bar would be drawn for each category. With clustering, one cluster of bars will be drawn for each category. The number of bars in each cluster is determined later on when you add the clustering grouping zone.
  2. Select a scale variable from the Variables list and drag it into the y-axis drop zone. Alternatively, you could have kept the default Count statistic. Note that the Chart Builder defaults the summary statistic to Mean when you add the scale variable to the y axis. You will change it in this example.

Change the summary statistic

  1. Click the Element Properties tab in the side bar to display the element properties. (If the side bar is not displayed, click the button in the upper right corner of the Chart Builder to display the side bar.)
  2. Bar1 should be selected in the Edit Properties Of list. If it isn't, select it.
  3. From the Statistic drop-down list, select Median.

Add clustering

  1. Click the Groups/Point ID tab.
  2. Select Cluster on X. Note that a new drop zone appears on the canvas.
  3. Drag a categorical variable from the Variables list to the Cluster zone. In each cluster, one bar will be drawn for each category in the variable. Depending on your style cycle preference, each bar is distinguished by color or pattern. You can change this specific instance by double-clicking the grouping zone. To change the default, choose Options from the Edit menu in the Data Editor. Then click the Charts tab and modify the Style Cycle Preference setting.

Finish

  1. Click OK in the Chart Builder dialog box to create the clustered bar chart that you specified.