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.
good stuff!
-Richard
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?
Thanks
Ben
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).
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
I get the same thing. Did you find a solution?
I did some work on the Google charts this week (blog post to come next week) and I think I know the reason. Give me a couple days and I’ll try to fix this.
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.
Hi there, I enjoy reading all of your article. I like to write a little comment to support you.
Can I use specific columns instead of the Title column, if yes then how?
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” (!).