how to create a custom web part/visual web part that will generate a chart from an existing sharepoint list. Is there any possible way of doing this aside from using the OOB Chart Web Part? We have been given a task to build a SharePoint site that will be used for logging, tracking and managing IT related requests and issues within an organization and records will be saved in a custom list (ticket list). There will be a page to display reports(report page) wherein a custom web part should be use to display a chart that will show a summary of data gathered.For example, a pie chart showing the request according to status, if it is new or rejected.
3 Answers
If you are comfortable in coding, then you can create a custom visual web part in which you may use .Net Chart Control 3.5/4.0. This chart can read data from your custom list through SharePoint Object Model programming. I have done this for one of my project and works absolutely well.
The other way could be to use application pages developed in Visual Studio where in you can show .net chart controls. So it depends what you need.
If you want to understand how to write custom web part to display charts, then here are the references:
http://mosshowto.blogspot.com/2008/12/asp-net-chart-control-sharepoint.html http://abhijitjana.net/2010/11/07/using-silverlight-chart-controls-with-sharepoint-2010/
The below two reference given by Dave and sanket are also good if it fits your requirement.
If you are looking for some free stuff then you should have a look at codeplex: http://charts4sharepoint.codeplex.com/
Cheers.
If you are only talking about a small amount of data then I would suggest you consider using the Excel REST service. You can use Excel to create your chart then pass the list data to it and get the redrawn chart image back again - all through a URL. This will give you a head start http://paylord.wordpress.com/2013/04/20/excel-rest-meets-xsl/
If there is too much data then take a look at one of the jQuery chart libraries such as http://www.amcharts.com/.
You might want to try Collabion Charts for SharePoint - completely GUI-based, has pie charts and more.