Creating dynamic charts of list views in SP2010

I was asked a question earlier today about if it would be possible to provide users a chart of SharePoint list data – but in such a way that it could be filtered by the user. My first thoughts were to use the Chart Web Part which is available with the enterprise licence of SharePoint 2010 – but I wasn’t immediately sure if this would allow our users to interact with the chart in such a way as to filter the display. It turns out that it’s not too difficult…

For those that aren’t aware, the Chart Web Part seems to be a cut-down version of a third-party product by Dundas. This posting has a good overview of what the differences are between the Dundas Chart and the OOB Chart.

So, using the Chart Web Part to get exactly the chart you want is a skill in itself! (And one that may leave you wishing that you had the full version of Dundas Charts…) However, for this example I just use a really simple scenario; I have a custom list that stores ‘shipments‘. These shipments have a supplier and a quantity. I want to chart my shipment quantities, but then allow the user to filter by supplier.

Step 1 – create the list, and add a list view web part onto a page

Step 2 – add the Chart Web Part onto a page. Note that the Enterprise Features site collection feature is what adds this web part to the gallery. Another interesting quirk in my environment was that I had to save a page before editing the properties of the web part, otherwise it disappeared!

Step 3 – configure the chart web part to take its data from the list view web part. This can be done by selecting the ‘Connect To Data‘ option from the web part menu, and then choosing ‘Connect to another web part‘ in the first screen. The following screens are self-explanatory and basically tell the chart to look at the list view web part as its data source.

Chart Web Part Connect To Data Option

Chart Web Part Connect To Another Web Part

Now that you have connected the two web parts on the page together you should see a chart which reflects the data in your list view web part.

Chart Web Part Not Filtered

And the best bit is that this connection is dynamic, e.g. if we filter the list view web part to display a particular supplier in my example then the chart automatically updates. I’m just using the default filter option available on the column headings here, but there’s no reason why this couldn’t be an additional filter web part on the page.

Chart Web Part Filtered

So there you have it – a dynamic chart based off a SharePoint list view web part. And the whole thing won’t take more than 5 minutes to do! Oh, except the hours you’ll spend creating the right chart…

share and enjoy
  • Print
  • Twitter
  • Digg
  • StumbleUpon
  • Yahoo! Buzz
  • Google Bookmarks
  • Facebook

4 comments to Creating dynamic charts of list views in SP2010

  • Lordan

    Hi Glyn,

    I have a question for the chart, how can i get dynamic charts categloy by Supplier,for example:
    Supplier Quantity
    Cog Co 100
    Sprocket Supplies 200
    Widget Weavers 250

    and y-axis: Quantity , x-axis: Supplier

    Thanks for sharing

    • Hi Lordan – good question!

      I spent a little while trying to get that up and running in my example; but failed miserably first time round. I got somewhere close by using a chart type of Stacked Column, and grouping by Supplier; but it was just not quite there.

      Looking at the posting that explains the differences between the SharePoint Chart and the original Dundas chart it looks like we may be missing a couple of really useful bits of functionality unfortunately.


  • Chan

    How would I get this to work with the list view on a separate page?

  • naresh


    How to create a chart web part(pie) for my list having 2 columns.activity and hours spent.10 list items is there.

    activity hours spent

    coding 4

    designing 3

    coding 4

    testing 5

    coding 4 like that.

    please help me.

    Thanks in advance,


Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>