Exercise 1: Using the Charting Web Parts

In this exercise, you will display the AdventureWorks data using the Chart Web Part pulling the data from Revenue By Country list within your SharePoint Online site.

Task 1 – Create the Chart web part

In this task you will use the Chart Web Part to provide a simple way to provide charts to a Web Part page so that users can visualize data in native lists within a SharePoint site.

  1. Using the browser, navigate to the Lab05 site.
  2. In the Quick Launch, you should see that there a list that has been created in the site named Revenue By Country. Click on the links to quickly inspect the data inside.

  3. Go back to the home page of Lab05.
  4. Add an instance of the Chart Web Part using the following steps.
    1. Select Site Actions » Edit Page to place the page into edit mode.
    2. Click on the Add a Web Part button inside the Rich Content Zone.
    3. Select the Chart Web Part from the Business Data folder and click the Add button place it on the page.

  5. Once the Chart Web Part has been added to the page, you should see a link with the caption of Data & Appearance. Click on this link to launch a wizard that will allow you to select a data source.

  6. Follow these steps to move through the wizard and connect the Chart Web Part to a SharePoint list as its data source.
    1. On the first page of the wizard, click the link Connect chart to data.
    2. Now select a data source. Choose Connect to a List and click Next.
    3. The next page asks you to pick a site and a list. Leave the current site as the selected site and make sure Revenue by Country is selected as the target list. Click Next.

    4. The next page shows you the data from the list but requires no action. Click Next.
    5. The final step of the wizard allows you to bind your chart to the data. Fill out this page as shown in the screenshot below (these should all be default settings on this screen) and click Finish.

  7. At this point you should have a basic column chart. Now you need to convert it into a pie chart and make it look more polished. Click the Data & Appearance link again and do the following:
    1. On the first page of the wizard click Customize Your Chart.
    2. The next page allows you to pick a chart type. Under Chart Type Categories select Pie. Select the 2D Chart Types tab and select the first chart type with the caption of Pie.
    3. Click Next.

    4. The next page allows you to change visual aspects of the chart. Change the Chart Width from 300px to 800px. Change the Chart Height from 300px to 400px.
    5. Click Next.
    6. On the next page, click the checkbox which reads Show Legend. Add a legend title of "Revenue By Country”.

    7. Click Finish to complete the wizard and to see the chart which should look like the one shown below.

  8. Now you will add a second instance of the Chart Web Part to default.aspx so you can also chart the sales data inside the Revenue by Country list.
    1. Select Site Actions » Edit Page command to place the page into edit mode.
    2. Select Insert >> Web Part

    3. Select the Chart Web Part from the Business folder and click the Add button place it on the page.

  9. At this point the new Chart Web Part instance should appear above the Pie Chart Web Part you created earlier. Now configure this following these directions:
    1. Click on the Data & Appearance link on new Chart Web Part instance so you can select a data source.
    2. On the first page of the wizard, click the link which reads Connect Chart To Data.
    3. The next page asks you to select a data source. Choose Connectto a List and click Next.
    4. The next page asks you to pick a site and a list. Leave the current site as the selected site and select Revenue By Country as the target list.
    5. Click Next.
    6. The next page shows you the data from the list but requires no action.
    7. Click Next.
    8. The next and final step of the wizard allows you to bind your chart to the data. Fill out this page as the screenshot shown below and click Finish.

  10. Once you have finished this task, your chart should now look like this: