In this post, I want to elucidate developers another useful set of tools in the Asp.Net arsenal that they can use for extending the SharePoint environment by adding visual capabilities or dashboard / data visualisation on the information residing in SharePoint Lists.
Asp.Net Charting Controls
That’s right; using Asp.Net Charting Controls and SharePoint Object Model you can easily create Data Visualisation web parts for your SharePoint environment.
To begin with, please go through the nitty-gritty on the following link
- Also bookmark Scott Guthrie’s Blog; it has tons of useful stuff.
This is how I integrated Asp.Net Charting to SharePoint 2007; SharePoint 2010 developers be cautious before following these steps, I cannot validate any of these will work on SharePoint 2010 (although, I have no reason to believe not to; make sure you do the same for 14 hive folder).
- Download the charting controls from the link in the post above.We will not require the Visual Studio Project/Solution Tools for our integration.
- Browse to – C:\Program Files\Microsoft Chart Controls\Assemblies
- Grab a copy of “System.Web.DataVisualization.dll” and add that to the GAC of your SharePoint server aka C:\Windows\assembly folder. Make sure it already don’t exist.
- To make sure Charting control utilise the colourful images like (pie, donut, bar, etc) copy the Charting images from MS Chart Project Images Folder to
- Browse to C:\Program Files\Common Files\Microsoft shared\Web Server Extensions\12
- Create a Folder MSCHARTCONTROLS
- Paste the Charting images here
- Most important
- Modify WebConfig File(s) – If you are using extended site of your web application then both needs to be modified.
- Take a back up of your Web Application webconfig
- Take a back up of Extended Site webconfig (if any)
- Inside the Webconfig look for <WebPartControls> section; inside <SafeControls> grouping
- Add “System.Web.DataVisualization” to SafeControl section like below.
<!-- CHARTING --> <SafeControl Assembly="System.Web.DataVisualization, Version=184.108.40.206, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI.DataVisualization.Charting" TypeName="*" Safe="True" AllowRemoteDesigner="True" /> <!-- CHARTING -->
You are now ready to use exciting integration of Asp.Net Charting with SharePoint 2007. In the next post I will illustrate, a sample webpart you can create utilising Asp.Net Charting Controls.