Creating a line chart by OrderMonthYear and Category

The next visualization that we will create is a line chart with the Month/Year and Category as dimensions. Create the chart with the following steps: 

  1. Before adding the new chart, resize the height of the bar chart to make some room on the sheet:

  1. Click on the Charts button on the asset panel, which is on the left-hand side of the screen. 
  2. Click on Line chart and drag and drop it into the empty space between the KPI visualizations and the bar chart:

  1. Expand the width of the new line chart to the right-hand side of the screen.
  2. Click on Add Dimension and select OrderMonthYear in the Fields section.
  3. Click on Add Measure and select Sales $ in the Measures section.
  4. The line chart will look like this:

  1. Now, click on the Add button in the Dimensions section of the Data properties panel at the right-hand side of the screen.
  2. Select Category from the Dimensions list.
  3. Now, each category will be presented as a line with a different color, as follows:

The chart has no legend, because there is not enough space to show it. To see the legend, hover the mouse over the top of the chart and click on the expand button. The expand button is found in the top-right corner, and it will expand the chart to full screen. The expand button is shown in the preceding screenshot.

We can also use another chart to help us create a legend for each color:

  1. Click on the Master items button to open the Master items pane.
  2. Click on the Dimensions heading to expand it.
  3. Click on Category and drag and drop it on top of the bar chart.
  4. Select Color by: Category in the menu.

The bar chart shows the categories with the same colors that are being used in the line chart. Now, we can see which color belongs to which category, using the bar chart as a chart legend. Consider the following screenshot:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset