Sunday, November 29, 2009

Chart Web Part

I used the new SharePoint 2010 "Chart Web Part" today, and I am already in love with it. As its name suggests, it is used to generate charts based on a data source (another web part, SharePoint List, BDC, Excel Services). It provides an easy to configure wizard that even a 10 year old kid can use. I will let the screen shots do most of the talking in this blog to give you a quick overview of its features and functionality.
To begin, you need to active go to Site Actions, Site Settings, Site collection features, and activate "SharePoint Server Enterprise Site Collection features".




On your page where you want to display the chart, click on Edit Page, Insert, Web Part. The web part is found under the Miscellaneous section.


It will add the Web Part to the page.


To begin configuration, click on "Data and Appearance".


Select "Connect Chart To Data".



Select "Connect to List" and click Next


Select your site and your List and click Next


If your list had, say Sales by Year data, you could use the "Filter Data" option to filter data to a particular year.


For this blog, I will not filter and instead use all the data present in the list.

Select your X and Y fields and click Finish.

To change the chart type, click on "Data and Appearance" and then "Customize Your Chart".



Click on "Standard Chart Types" tab.





There is a range of options. I will select "Pie" under Chart Type Categories.



There are different types of pie charts available. Select the one you wish to use and click on Next.

Select a suitable appearance matching your site theme, and the required size.




I plan to show a legend, so I decided to set the Width to be double of the Height.  I selected the following options:

Theme: Light Steel Blue
Chart Width: 800 px
Chart Height: 400 px
Chart Image Format: Jpeg

Note that the chart image type will decide the image type rendered on the page.

Check "Chart Title" and "Show Legend".



Set Chart Title as "Sales By Year" and set the position to Bottom Center.



Click "Finish" to exit the wizard and view the chart on the page.



Click on "Edit Web Part" to review and change the chart and other web part settings.



For basic charts and graphs scenarios, it is likely to replace Excel Services and SSRS. What do you think?

So simple, yet so powerful.

No comments: