Pie and Bar Charts (Google connector)


I already mentioned it briefly in an earlier post: the SharePoint User Toolkit now includes a tool that allows you to add simple pie or bar charts to your SharePoint pages.

The code is actually a connector that points to the powerful Google Visualization interface. For this reason, Internet access is required.

A common concern with online tools is data security. In this case, we are safe, Google’s privacy policy explicitly states that no data is sent to the server. The charts are directly rendered in your browser. This is a major difference with the Google Image Chart API, where data is sent in clear to the server, which uses it to build and return an image.

Under the hood, the code works the same way as the Image Rotator: it retrieves data from a specific view of your SharePoint list.

11 thoughts on “Pie and Bar Charts (Google connector)

  1. Christophe –

    Cool stuff. Love it.
    Have one question – I upload the file to the document library yet nothing shows in the web part. Is there something else I am missing on this?


    • It’s hard to tell… Double check the steps, in particular that you have a list view with Title as first column and the values in the second column (for example you should not have an attachments column first).

  2. Hi Chris, I can get the charts to work the first time but when I refresh the page I receive the javascript error ‘google.visualiztion.DataTable’ is null or not an object. thanks peter

  3. Sorry I’m trying to understand the creation of the columns part. Can someone expand on the two columns. Right now I understand the 1st which is the list of items for a drop down. I’m using Safety, Quality, and Production. I want to know what most of my work time is being spent on. What I don’t understand is the 2nd column. Is it a totalizer of the list that the particular items shows up? Can someone expand?

    • In this simple solution, the second column just contains the values that will be used for the chart. If you want to chart totals you’ll need an extra step.

    • Michael, you can try this: in the code, search for a[i].name.indexOf(“Title”) and replace Title with your column name. Note that you’ll have to use the internal name, so for example “Created By” will actually be “Author” (!).

Comments are closed.