Use line charts, pie charts, and bar charts to display your data. When working with charts, the data that you import should be structured like the following:

  • Each series should be in the first row.
  • Labels should be in the leftmost column.

For example, your data should look similar to the following:

You can create and use these charts within PowerApps. Let's get started.

Prerequisites

  • Sign up for PowerApps, and then install PowerApps. When you open PowerApps, sign in using the same credentials that you used to sign up.
  • Create an app from a template, from data, or from scratch.
  • Learn how to configure a control in PowerApps.
  • Download ChartData.zip, which contains sample data as an XML file. Follow the steps in this topic to import it directly into your app. As an alternative, decompress the .zip file, open the XML file in Excel, and save it to a cloud-storage account.

Import the sample data

In these steps, we import the sample data into a collection, named ProductRevenue.

  1. On the Insert tab, select Controls, and then select Import:

  2. Set the control's OnSelect property to the following function:
    Collect(ProductRevenue, Import1.Data)

  3. Press F5 to open Preview mode, and then select the Import Data button.

  4. In the Open dialog box, select ChartData.zip, select Open, and then press Esc.

  5. On the File menu, select Collections.

    The ProductRevenue collection is listed with the chart data you imported:

    Observação:

    The import control is used to import Excel-like data and create the collection. The import control imports data when you are creating your app, and previewing your app. Currently, the import control does not import data when you publish your app.

  6. Press Esc to return to the default workspace.

Add a pie chart

  1. On the Insert tab, select Charts, and then select Pie Chart.

  2. Move the pie chart under the Import data button.

  3. In the pie-chart control, select the middle of the pie chart:

  4. Set the Items property of the pie chart to this expression:
    ProductRevenue.Revenue2014

    The pie chart shows the revenue data from 2014.

Add a bar chart to display your data

Now, let's use this ProductRevenue collection in a bar chart:

  1. On the Home tab, add a screen.

  2. On the Insert tab, select Charts, and then select Column Chart.

  3. Select the middle of the column chart. Set the Items property of the column chart to ProductRevenue:

    The column chart shows the revenue data from 2012:

  4. In the column chart, select the center square:

  5. On the Chart tab, select Number of Series, and then enter 3 in the formula bar:

    The column chart shows revenue data for each product over three years: