Silverlight PivotViewer and SharePoint
Saturday, July 10, 2010 at 2:53AM
Microsoft just released a new control PivotViewer for Silverlight.
http://www.microsoft.com/silverlight/pivotviewer/
If you haven't seen this yet - go check out the video then come back, I'll wait here.
It's a web-based control to provide pivot functionality for datasets. For fixed data - you can pre-generate the data set. For dynamic data, the collection could be generated dynamically and served.
So what would happen if you throw it at SharePoint, I ask?
The initial results are astounding! Check these out:
Figure: Connecting it to listdata.svc OData service
At the root level it really is quite boring.
Figure: Connecting to a document library OData service
OK this is getting fun. Facets! Sort/Display/Zoom
Figure: Sorting the document library by Modified date
You probably can see I've uploaded a bunch of documents in the last hour :-)
The screenshots don't do this justice - when you filter down, change sort… the boxes fly all over the place it's as if I'm literally shaking SharePoint apart to zoom in on my data.
So it looks like I'll be extremely busy next couple of weekends and evenings:
- Generate collection data across site - this will let me filter the "Path" facet to select which list/document library I'm after
- What does this mean for big sites?
- Add more visualizers, use Word/PPT thumbnails
- Create configurable background colours for different content types
- Add a contextual menu and hook it back through SharePoint actions
- And the Holy Grail - is it possible to make this work as a Sandbox Solution?
- The current sample reference application requires IIS HttpHandlers to serve dynamic collection data consumed from OData.
- Sandbox solution problem may be tricky.
It's times like this I stood back and appreciate what Microsoft does. You guys are awesome. Different teams produce different software and they just magically work together. Makes us look like heroes.
/Salute
SharePoint,
Silverlight 





Reader Comments (7)
Can you please post what you needed to do to have the PivotViewer process the Sharepoint site or list? If I just point the sample code to http://mysite or http://mysite/_vti_bin/listdata.svc, it just reports an error "Error parsing <url>".
Thanks!
Hi Don, have a look at the sample project - it implements a few different handlers - one of them is OData. You use that but have the URL point to SharePoint's listdata.svc
Hi,
I have little problem. I get xml http://mysite/_vti_bin/ListData.svc. After I create project Silverlight and include PivotViewer.
And write this code:
private static readonly string MauritiusCollectionUri = "http://mysite/_vti_bin/ListData.svc";
PivotViewerControl.LoadCollection(MauritiusCollectionUri, "");
After I upload xap on site and show silverlight web part. But I don't see collection. List is empty.
What's wrong?
Hi Sergey,
I still haven't had time to look into building a better integrated experience, but at a glance, I think you are confusing the "collection" with OData
PivotViewer needs a data collection to render. It can get this from a URL.
The example includes a few different URL handlers that can transform other types of data, e.g. RSS, or OData, or Tweet Stream into this "Pivot Collection" that the pivot viewer is after.
What you need to do is to pass the SharePoint OData url to the OData handler in the sample project, then get the pivot viewer to render the dataset from that.
That'll get you started.
The better way, I think, for SharePoint and PivotViewer, is to implement a dynamic dataset and query the OData progressively. I wanted to explore ideas along this direction but just never found time in the last couple of months.
Hi, JohnLiu.NET
If you have sample Sharepoint+PivotViewer, else please help me :).
I need to implement this solution within a sandboxed solution, which you mentioned would be tricky. Do you have any suggestions on how I might work around the inability to create the necessary HttpHandlers?
Sorry Evan, this "project" got into the "hard" bucket and I haven't had time to return to this and check it out.
I have talked to fellow SharePoint guys in Australia and they said Microsoft has an internal working demo of PivotViewer with SharePoint 2010. They also said that it wasn't a sandbox since you need something on the server side to pre-generate the images and push it out through a custom webservice, sounds like a timer job - if you try to do it all on the client side in Silverlight the speed isn't acceptable.