I want to customize SharePoint chart web part programmatically to display charts from the excel sheet having different charts on different sheets of the excel. How can I customize chart web part so that it will have a scroller in the end to display different charts and which will be keep scrolling one after another. Charts will be already created in the excel sheet I only want to show them on the webpart with the scroller in the bottom.
2 Answers
How about using jQuery, jQplot and XSLT? A lot lighter than any other technique as it offloads processing to the client and be default it is how SharePoint Designer will build your pages from Lists.
JavaScript / jQuery in XSLT is the lightest and fastest rendering available to you inside SharePoint, yes it is client side and that's the beauty of offloading the processing from the server. You can make use of jQuery Mobile, access Ajax faster and more customisable than say - Report Builder or Excel or even ASP.Net.
All server side tools and programming techniques are helpful for requirements / data gathering and excellent suggestions for production servers, if you have zillion's of megabytes of RAM and Clusters of CPU's at your disposal!
The first part of the requirement, would be to get your data into SharePoint Lists. For this you have Business Connectivity Services or BCS. The best way to go with BCS is to consume the data from SQL or ODBC data sources - more on MSDN.
Once you have data in External Content Types, which are generated from your BCS service application (nothing more than an XML file describing types, or a C# assemblies built with SharePoint designer or Visual Studio and SharePoint Extensions), you can create the List from the ECT and manipulate the List as document.element / ID or XSLT transform groups.
http://blogs.msdn.com/b/yojoshi/archive/2010/06/17/using-jquery-with-sharepoint-2010.aspx
Client Side AJAX Applications in SharePoint 2010 - By: Lee Richardson - is worth a look!
http://jpoint.codeplex.com/ - and - http://spservices.codeplex.com/
jQuery also can access and modify web services by the SOAP client and put data back into SharePoint lists;
var wsMethod = "UpdateListItems";
var soapNs = "http://schemas.microsoft.com/sharepoint/soap/";
var soapBody = new SOAPObject(wsMethod);
soapBody.ns = soapNs;
soapBody.appendChild(new SOAPObject("listName")).val("list1");
soapBody.appendChild(new SOAPObject("updates")).val(batch);
var sr = new SOAPRequest(soapNs + wsMethod, soapBody);
SOAPClient.Proxy = "http://server/_vti_bin/lists.asmx";
SOAPClient.SendRequest(sr, processResponse);
Jan Tielens Bloggings [MVP] (Belgium) - hosts a blog on this subject for SharePoint 2007 - Integrating SharePoint 2007 and jQuery - (worth a read) and is the publisher of the Smart Tools project on Codeplex - http://smarttools.codeplex.com/
The facts are, there is a quick way of doing things, A by the book way of doing things and the way which suits you best when it comes to SharePoint.
Good Luck!
A bit of a different approach from what you asking but what about just using the Excel Services Web parts?
You can target one of these at a specific named chart in an excel workbook saved to a SharePoint site.
Drop two of those into a page, configure them to point at the charts that you're after, sorted. As an added bonus you can configure the height and width to eliminate scroll bars, export the configured web part and upload it ot the webpart gallery and re-use it as you want, no code required.
-
hi @GavinB, my requirement is bit more than just using a default webpart. I want to somehow customize the webpart for its title so that it will have some background color for the title bar of the webpart. Also want some sort of javascript/jquery to keepscrolling the webpart chart's one after another, which will be coming from different sheets of the excel in random manner. So want to customize the chart webpart as per my requirement. Do you have idea how can I customize Business Data Chart webpart programmatically. I googled a lot but hav't found anything about programmatically customization? Mar 5, 2012 at 10:18
-
well, you could put a bunch of web parts into a jQuery slider/rotator?– GavinBMar 5, 2012 at 10:25
-
-