Getting Started with the Data Viewer Client Side Web Part

Learn how to effectively utilize the Data Viewer Client Side Web Part and get started with visualizing data on your site.


Now that the Data Viewer is installed, we can provide a good overview of the Data Viewer product within SharePoint Online and Microsoft Teams. We’ll configure the Data Viewer to display external data within a grid view using data bars and conditional formatting, use the web part connections between multiple instances of the Data Viewer, and build multiple series charts based upon an Excel Workbook.

 

 

Configuring the Data Viewer within Microsoft SharePoint Online
 

The Lightning Tools Data Viewer Client Side Web Part is a modern web part that can be used within SharePoint Online or Microsoft Teams tabs to display grids of data or charts from SharePoint lists or external data sources such as Excel, SQL Azure databases, OData Services, Business Connectivity Services or other Web Parts using web part connections. 

In this walkthrough, we’ll initially connect to some OData services and display supplier and product information within two separate instances of the Data Viewer. Using web part connections, we will join the web parts together, which will allow you to select a supplier and view the products that the supplier supplies. Following that, we’ll configure a new instance of the Data Viewer to display a Microsoft Excel workbook as a dynamic chart within SharePoint Online and Microsoft Teams.

 

Displaying Data within SharePoint Online
 

Once you have added the Data Viewer to a SharePoint page, follow the below steps:
 

  1. Click Configure to open the Configuration Dialog.


     
  2. The configuration dialog box will open. You will see four tabs on the left hand side; Web Part, Data Source, Columns, and Display. The tabs are explained below:
    1. Web Part – The Web Part tab is the initial tab where you can select the type of data that you will connect to and whether you want to display it as a Grid View or a Chart View.
    2. Data Source The Data Source tab is where you will configure the connection to the data source. The page will vary depending on the data source type you are connecting to.
    3. Columns Tab – The columns tab enable you to select the columns that you want to display in the grid or make available to the chart. You can also create calculated columns or apply persistent filters on the columns tab.
    4. DisplayThe Display tab allows you to refine the display, such as data formatting, colour formatting, pagination options, or configure the display of your chart.


       
  1. On the web part tab, under Data Source Provider, select OData Service.
  2. Leave the default values for the Display ProviderLimit Number of Items, and Data Refresh Interval.
  3. On the Data Source Tab, copy and paste the following service URL into the OData Service URL field. https://services.odata.org/V3/Northwind/Northwind.svc/
  4. Click Load Entities to retrieve the list of Tables.
  5. Select “Suppliers” from the list of available entities.


     
  1. Click the Columns tab, and select all of the columns by clicking the column selector above the column names as shown below:


     

Note: On the columns tab, you can add calculated columns and filters. We will apply filters and calculated columns to the next Data Viewer instance that we will add shortly.

 

 

  1. On the Display Tab, you’ll see that you can apply data formatting, column alignment, grouping, colours and formatting. Note that clicking the ellipses next to the columns will bring further attributes. You can also refine options at the bottom of the dialog such as pagination, column header display. Turn on Allow Selecting Rows and then choose Save.


     
  2. You will now see you data returned from the OData Service. Next, we will add another instance of the web part.
  3. Add Another instance of the Data Viewer by clicking the + and choosing Data Viewer as shown below.


     
  1. On the Web Part Tab, select OData Service again as the Data Source.
  2. On the Data Source Tab, paste the same OData Service URL as you did in Step 5, and click Load Entities.
  3. Select Products.
  4. On the columns tab, select all columns.
  5. Click the Filter Icon for the SupplierID column.
  6. Click the connect icon as shown below to obtain the filter value from the first Data Viewer instance.
  1. Select Lightning Data Viewer as the Data SourceSelected Items, and SupplierID as shown below.

  1. Click Save.
  2. On the Display Tab, set the Unit Price format to currency


     
  1. Click Save.
  2. Test your connection by selecting a supplier from the Suppliers Data Viewer instance. You should then see the products that the selected suppliers supply.

Next, we will add some conditional formatting and data bards to the Products list.

  1. Within the Products list, select the dropdown on the Units in Stock column and choose Column Settings, Formatting.
  2. Click the trash can icon to remove the condition on the conditional formatting dialog.
  3. Click Data bar, and set the maximum value to 150.
  4. Set the Show Value to hide Value as shown below.


     
  1. Click Save.
  2. Click the drop-down for the Discontinued column, and choose Column Settings, Formatting.
  3. Set the condition to be Discontinued = False
  4. Add a new conditional style, and set the condition to be Discontinued = True.
  5. As shown below, select a red icon for the first condition and a green icon for the second condition.


     

The Conditional Formatting will now be applied to the Products list so that you can clearly see the products are are discontinued. Next, we will use the Data View to build a chart based upon an Excel Workbook.
 


Build a Multi Series Chart within the Data Viewer


In this walkthrough, we’ll create a simple Excel Workbook within the SharePoint site document library and then configure a dynamic chart based on it.

  1. Navigate to the Document Library within the current site that you are working in.
  2. Create a New Excel Document within the Excel workbook.
  3. Create the following Excel content


     
  1. Highlight your range of data, and choose Format as Table.


     
  1. Ensure that “My table has headers” is checked and click ok.


     
  1. Ensure your Excel workbook is saved in the Document library.
  2. Add a new instance of the Data Viewer to your SharePoint page.
  3. Click Configure to launch the configuration dialog.
  4. In the Data Source Provider field, select Microsoft Excel.
  5. In the Display Provider field, select Charts view.
  6. On the Data Source tabexpand the current site and then documents and select the document library containing the Excel Workbook you created.
  7. You will be prompted to select an Excel workbook, a sheet, and a range. The range will be detected automatically.


     
  1. Select all four columns; Month, Sales Revenue, Cost of Sales, and Profit.


     
  2. Click the Display Tab.
  3. You will see a chart based on your data.


     
  1. Click the Cog icon next to Sales Revenue


     
  1. Choose Column as the Category Type, and select Theme Color for the colour of the columns.
  2. Click Save
  3. Click the Cog Icon next to Cost of Sales and change the colour to bright green.
  4. Click the Cog icon next to Profit, and change the category type to area, and the colour to turquoise.
  5. Click Save to complete your chart.



Using the Lightning Data Viewer in Microsoft Teams

The Lightning Tools Data Viewer can be enjoyed in Microsoft Teams Tabs as well as SharePoint Online. To add the Data Viewer to Microsoft Teams:

  1. Click Add a Tab in Microsoft Teams
  2. Select the Data Viewer
  3. Click Save
  4. Click Configure to get going! You can repeat some of the steps above but within Microsoft Teams.

 

Note: If the Data Viewer is not available, you may need to navigate to the SharePoint App Catalog, and choose Sync to Teams for the Data Viewer package.

 

 

Was this article helpful?

Can’t find what you’re looking for?

Our world-class Customer Success team is here for you.

Contact Support