in

Dot Net Mafia

Group site for developer blogs dealing with (usually) .NET, SharePoint 2013, SharePoint 2010, Office 365, SharePoint Online, and other Microsoft products, as well as some discussion of general programming related concepts.

This Blog

Syndication

Archives

Corey Roth [MVP]

A SharePoint MVP bringing you the latest time saving tips for SharePoint 2013, Office 365 / SharePoint Online and Visual Studio 2013.

Impress the Boss with the SharePoint 2010 Chart Web Part

Let’s face it.  Nowadays, management absolutely loves BI.  Especially when there are lots of pretty charts and graphs.  The thing is I’m not a BI guy.  Cubes scare me to death.  Luckily, there is the new snazzy Chart Web Part in SharePoint 2010 that gives you some BI like capabilities.  It doesn’t allow you to drill down and pivot and do all that fancy stuff, but it does let you make some nice graphs and charts that any ordinary developer can do.

To get started, first you need an Enterprise version of SharePoint 2010.  Unfortunately, I used the key that was later determined to be the wrong one which led me to reinstall SharePoint with a new key.  If you don’t have any Enterprise options available, then you will be reinstalling.  Assuming, you do have an Enterprise key, you then need to activate the SharePoint Server Enterprise Site Collection Features.

ChartWebPartFeature

This adds the chart web part (among other things).  Then edit any page and add a Chart Web Part.  You can find it under Miscellaneous as of Beta 2 (they may have found it a new home in later versions).

ChartWebPartAdd

When you add it to the page, it uses some dummy data and displays a simple bar chart.

ChartWebPartDefault

At this point, you might be asking yourself “What kind of data can I bind this to?”.  By clicking Data & Appearance, you will see the following screen which leads you to links to customize the appearance or bind to data.

ChartWebPartDataAndAppearance

We’ll start by going to Connect Chat To Data.  Look at these great options we have to choose from.

ChartWebPartDataSources

We can connect to another web part, a list, an external content type (looks like they need to update the BDC wording they have there), and to Excel Services.  I tried going straight to an external content type, but I got a yellow screen.  Apparently that is broken on my version, but I’m sure it will work in RTM.  There is a work around though.  You can pick an external list using the Connect to a List option.  This is exactly what I am going to do.

Remember that external list I created on my BCS blog post?  I’m going to use that list and extend it some.  What I did is I created a new custom list to contain Monthly Sales information.  I used an External Data field to allow the user to pick a product from the external content type and enter in some sales data in a field.

ChartWebPartList

This is the list we are going to use on our chart.  On the next step of the wizard, we are allowed to pick a list.  Note that it also allows you to choose other sites in the collection as well.

ChartWebPartListDataSource

The next step allows you to filter your data first if you are so inclined.

ChartWebPartWizardFilterData

The Chart Web Part has a ton of configurable options.  On this last step is where you will start seeing some of them.  The main thing to set here is your X and Y fields.  You can also specify something to group by as well.

ChartWebPartWizardBindData

Once you finish this last step, you’ll get something that looks like this.

ChartWebPartWithData

So, what we have here is a chart bound to data coming from a database (via external content type) and a SharePoint list.  Pretty cool, right?  I think so.  It gets better though.  What if your boss doesn’t like bar charts?  No problem.  There are tons of chart types to choose from.  Just click on Data & Appearance again and then Customize Your Chart.  Look at all of these built in chart types you have.

ChartWebPartOptionsPie

ChartWebPartOptionsBar

On the next step, you can further customize the chart you choose.  It has some nice pre-built color themes and you can customize the size and what not.  It also gives you a live preview as you change settings.

ChartWebPartOptionsPie2

Here is what my new chart looks like.

ChartWebPartPie

You can customize things even more by going to Advanced Properties.  It would probably take me a week to show you everything that this web part does, so I recommend you go try it out for yourself.  The charts and graphs this thing produces are so cool, you should have no issue getting your boss to sign off on the Enterprise license. :)

Comments

 

Boris Gomiunik said:

Interesting. Yes, and the BDC just won't go away :D

February 24, 2010 3:27 PM
 

CoreyRoth said:

Heh.  I have to say it's pretty nice to work with now.

February 24, 2010 3:33 PM
 

Linkliste zu SharePoint 2010, Office 2010 und CRM ??? 10/04/01 « Sharepoint Infoblog said:

Pingback from  Linkliste zu SharePoint 2010, Office 2010 und CRM ??? 10/04/01 « Sharepoint Infoblog

April 1, 2010 1:30 AM
 

Linkliste zu SharePoint 2010, Office 2010 und CRM ??? 2010/04/01 « Sharepoint Infoblog said:

Pingback from  Linkliste zu SharePoint 2010, Office 2010 und CRM ??? 2010/04/01 « Sharepoint Infoblog

April 1, 2010 3:57 AM
 

sachin choube said:

Hi Coreyroth,

Can you please tell  me how to remove DataAppearance & advance Properties from this webpart. My boss is impress but he don't want that

April 23, 2010 9:37 AM
 

Hiren said:

Hello,

I tried to make a chart with out of box chart webparts in sharepoint 2010.but i cant find the option to make a total of particular column.

i want to make a chart in which the total funding amount is displayed yearly basis,country wise and department wise.

India        146000

Education total=40000

2008        30000

2010        10000

Finance        total=42000

2008        42000

Health        total=64000

2008        52000

2010        12000

Grand Total 146000

i want my data as a total sum department wise(Group by Department),for particular company,

so this total amount should display in pie chart.

i m using sharepoint custom list to connect the chart.

i tried with sharepoint 2010 but cant find any solution

please help me

Thanks n regards

Hiren

hiren.patel@bitscape.co.in

May 4, 2010 4:44 AM
 

AT said:

on Sharepoint RTM (May 2010) :

I 've been looking at chart element for a day and a half and haven't figured it out. I have a list of items (each has a title, a region, a dept and amount).

I have a view grouped by a field (region, or dept for example) looks right.

Now I want the chart to show me the rolled up view and it is not working!

May 10, 2010 9:46 PM
 

Andrew said:

<style type=text/css>

table table table table b a {display:none;}

</style>

May 19, 2010 2:17 AM
 

Sharepoint 2010 BI – Integrasjon mot fagsystemer « Windjusveen`s blogg said:

Pingback from  Sharepoint 2010 BI &#8211; Integrasjon mot fagsystemer &laquo; Windjusveen`s blogg

September 7, 2010 2:35 AM
 

hamid rafati said:

Hi

thanks for your great post.

I refer to yours in my own blog

September 18, 2010 12:27 AM
 

SVB said:

Hi...Thanx for the nice post.

Is the Chart webpart option also available in publishing site template? When I checked, I could find it under BI site template only. Please advise. Thanks

September 23, 2010 7:56 AM
 

CoreyRoth said:

@SVB Yes, the Chart Web Part should be there under business data.  Is your publishing site upgraded from SharePoint 2007?  Check and make sure you see MOSSChartWebPart.webpart in your site collection solution gallery.  If it's not there, you may have to manually add it.

September 23, 2010 8:39 AM
 

Mark W. said:

Thanks for sharing the knowledge Corey.

September 24, 2010 7:19 PM
 

Abhishek said:

This webpart does not work for me

Consider a custom list of projects.

 Title          Quarter     Cost

Project1       Q1          15,000

Project2       Q2          10,000

Project3       Q4          20,000

Project4       Q4          30,000

Project5       Q4          40,000

Could not configure the following charts

1) A chart showing me the number (count) of projects per quarter. In this example: Q4 should show 3 projects.

2)A chart showing the total cost per quarter.  In this example Q4 should show 90,000$

I noticed that bars for Q4 appears 3 times in the above example instead of aggregating and showing just once.

September 30, 2010 12:28 AM
 

Raj Samtani said:

Hey Corey,

Do you know how to make it automatically cumulate data for the chart.  In your example, what if you had red toy trucks on one line and orange toy trucks on the another.  How do you get it to add the toy trucks together?  Actually, I just noticed it's the same questions as Abhishek.

October 14, 2010 8:53 PM
 

santhosh said:

Hi ,

I have created a chart webpart ,but i need different color for each bar in the webpart ,i have searched but i could not find  it..i have changed in the series in advance properties..please tell me the way to achieve it........

October 27, 2010 8:19 AM
 

stylo said:

Hi,

Chart web part gives me an error if i try view it anonymously - Object reference not set to an instance of an object.

LOgged in i see it perfectly.

October 27, 2010 9:43 AM
 

George said:

Hi,

I'm trying to figure out how to the same as Raj & Abhishek too - any pointers?

November 2, 2010 9:18 AM
 

George said:

I can't get this to work on a migrated 2007 list (works fine on a brand new 2010 list) - any ideas why? or more importantly how to fix it?

November 3, 2010 4:53 AM
 

Fab said:

Hi, i have worked with other graph web parts before ex (dundras) and they did have an option to enter C# code to modify your chart. Is this the case with the chart web part of share point 2010, if it is so, can you tell me where exactly to go for this feature

Thanks

November 3, 2010 2:44 PM
 

CoreyRoth said:

@santosh I'm not sure if I have seen a way to do that.   @George I haven't figured out how to get it cumulate either.

November 5, 2010 10:58 AM
 

CoreyRoth said:

@George - Migrated List.  Now that is interesting.  My guess as to the reason is that the underlying schema for deploying lists has changed.  I'm surprised it doesn't work.  I want to research this more.

November 5, 2010 11:02 AM
 

CoreyRoth said:

@Fab To my knowledge, there is no code option with this web part.

November 5, 2010 11:09 AM
 

Hamza Farooq said:

Can we somehow , anyhow connect this chart web part with performance point report.  Because to be honest Performance point chart options are good but this is EXCELLENT !!!!!  for example

Legend Location:

Performance point : only top or right

Chart webpart : out of 8 or 10 locations well placed as dial pad for location idea is awesome!!!!

I came here finding how to add a legend on performancepoint pie chart.

November 10, 2010 7:49 AM
 

Parameswari said:

Hi,am trying like Abhishek.Any idea?

November 16, 2010 10:42 PM
 

Lukito said:

Hi Corey have you ever encountered this?

I tried to connect a chart with an External List but the SP only allows one column to be selected for the Y-Axis. All columns are available for the X-Axis.

Have you ever encountered this? Incidentally, that lone column is the only date/time column. I'm looking at your example chart with two non-time valued axes with envy!

December 9, 2010 11:11 PM
 

CoreyRoth said:

@Lukito That is odd.  Are they different column types or something?

December 10, 2010 5:12 PM
 

BobbyOutlaw said:

Y-Axis will only show columns with numerical data.

If you have a column that contains numbers, but Sharepoint views it as text, it will not allow the column on the y-Axis

December 21, 2010 8:59 AM
 

Chart Web Part in SharePoint Server 2010 « SharePoint and relevant Technologies said:

Pingback from  Chart Web Part in SharePoint Server 2010 &laquo; SharePoint and relevant Technologies

January 10, 2011 2:52 AM
 

Christo Bahchevanov said:

I would like to invite you to take a look at Nevron Chart for SharePoint. The web part comes with the Nevron Pivot data aggregation engine and it can help you solve very complex data analytical tasks in SharePoint.

The Chart web part is available for SharePoint 2007 and 2010.

January 19, 2011 3:30 AM
 

Rob Hartley said:

When you select Pie Chart, in Step 2 one of the theme options is Cusom. Where do you define the custom theme?

March 16, 2011 6:59 PM
 

SharePoint from Scratch » SharePoint 2010 Chart Web Parts said:

Pingback from  SharePoint from Scratch    &raquo; SharePoint 2010 Chart Web Parts

March 28, 2011 2:42 PM
 

Kalyan Guin said:

Hi Corey,

I have a cuatom issue management list which is as follows.

ID Title AssignedTo IssueStatus Description Priority Duedate

1 TestIssue1 TestUser1 Open Test1 High TestDate1

2 TestIssue2 TestUser2 Open Test2 Normal TestDate2

3 TestIssue3 TestUser2 Closed Test3 Medium TestDate3

4 TestIssue4 TestUser2 In Progress Test4 Medium TestDate4

Where :  

ID - Single Line of Text

Title - Single Line of Text

AssignedTo - Person or Group

IssueStatus - Choice

Description - Multiple Line of Text

Priority - Choice

DueDate - Date and Time

I want to create a Chart using the SharePoint 2010 "Chart Web Part" which will show a graphical report of issue status (i.e. - How many issues are Open,Close e.t.c.).

But not able to figure out how to get the exact data from my list. Tried the steps you specified in your post but it is not working. Need your kind help to get the exact data for this senario.

April 11, 2011 3:52 AM
 

CoreyRoth said:

@Kaylan Are you able to select the list at all?  Can you see the columns that are available?  Is the Chart Web Part on the same site or somewhere else?

April 12, 2011 2:31 PM
 

sidhu said:

SharePoint 2010 Chart Webpart to sharepoint list, it's all good but anonymous can't see the chart and I get this error: Object reference not set to an instance of an …

May 10, 2011 7:39 AM
 

Brett said:

I really hate to drop out of the internet and beg for help, but I've exhausted google search and my real world contacts. I did a brand new install of sharepoint 2010 std. All my normal Webparts catagories are there but the Miscellaneous category is missing! Can you direct me? Please please say you are too busy if you are, I truly will understand! (it looks like I can upload a file that will import the webpart if someone could export it?)

May 27, 2011 1:53 AM
 

CoreyRoth said:

@Brett This required Enterprise Edition.  Do you have the Enterprise features enabled?  If you have standard edition you won't have these web parts.  Also, did you upgrade from SharePoint 2007 or is this a new installation.  

May 30, 2011 9:24 PM
 

swati jain said:

How to deploy this chart webpart without manual configuration

June 16, 2011 7:25 AM
 

CoreyRoth said:

@Swati You can always save the web part using the export web part functionality.

June 20, 2011 4:10 PM
 

Cristopolis Dieguez said:

This post was a big help, once I installed the chart I ran into @lukito issue with the Y axis.  Thanks to @BobbyOutlaw for the help.

August 2, 2011 10:36 AM
 

Hadi said:

hi,

i have a problem. any solution?

My List

--------

month, work, goal

My Data

-------

Jan, 10, 20

Feb, 8, 23

Mar, 18, 15

Apr, 8, 9

etc....

how can i filter the data in first 3 months, second 3 months,

thirth 3 months and etc....

to create this chart:

My Chart

-------

X axis: first 3 months, second 3 months, ......

Y axis: work and goal

August 15, 2011 6:03 AM
 

Kioro said:

Well - you cannot perform complex filtering, sorting and grouping with the MS Chart web part - it just displays tables and has no built-in data analisys.

The only chart that I know of which can do that is  Nevron Chart for SharePoint - see this link for examples:

www.nevron.com/spvisionexamples.htm

August 31, 2011 4:54 AM
 

Amit said:

hi,

I get below error when Chart webpart is configured

"An unexpected error has occurred.

Web Parts Maintenance Page: If you have permission, you can use this page to temporarily close Web Parts or remove personal settings. For more information, contact your site administrator. "

So can you tell me what is the matter and are there any specific features or services to be run on servers

Please help me out.

Thanks and Regards,

Amit

September 20, 2011 2:27 AM
 

Ganesh said:

Can we use SQL Server 2005 Table/View as Datasource to this charts?

October 13, 2011 1:58 AM
 

CoreyRoth said:

October 17, 2011 9:47 PM
 

paul said:

How can I get the chart web part to display more dates? I have an excel file from 9/1/2011 - present but I only see 4 dates on the chart.

October 25, 2011 11:48 AM
 

RicardoE said:

Has anyone figure out @Abhishek problem because I'm having the same problem??

And  the same problem as @Lukito, so at @BobbyOutlaw or @CoreyRoth  can the Y-Axis have Text in them?? and if so how do you go about doing this.

November 22, 2011 3:58 PM
 

Prasath S said:

Is it possible to use  custom webpart datasource for chart? and also want to change the X-axis and Y axis

January 11, 2012 3:15 AM
 

DavidSea2 said:

How do you set the Gap Width on a column chart?

March 15, 2012 2:07 PM
 

Paul said:

Do you have a discussion about Excel Services? I use that method which I think is much easier to use, just running into format related issues that I can't figure out.

April 18, 2012 3:45 PM
 

CoreyRoth said:

@Paul try this article in regards to Excel Services. www.dotnetmafia.com/.../how-to-use-the-chart-web-part-with-excel-services.aspx

April 25, 2012 10:36 PM
 

Jie said:

Same question with RicardoE and Abhishek,

anyone can help?

August 5, 2012 10:55 PM
 

ankit said:

im my site there is no option of chart web part how i can enable this

August 28, 2012 2:02 AM
 

CoreyRoth said:

@Ankit you must have Enterprise Edition and have Enterprise Features enabled.

August 29, 2012 6:36 PM
 

Chart Web Part Manipulation Of Genius | The SharePoint Effect said:

Pingback from  Chart Web Part Manipulation Of Genius | The SharePoint Effect

October 4, 2012 4:30 PM
 

bstricks said:

For "counts" you need to use "GROUP BY" and add a "sum(1)" column

For example, I wanted to count rows based on submission dates:

select day_of_submission, sum(1) as [Count]

from my_table

group by day_of_submission

October 30, 2012 2:19 PM

Leave a Comment

(required)  
(optional)
(required)  
Add

About CoreyRoth

Corey Roth is an Applications Architect at Infusion specializing in ECM and Search.
2012 dotnetmafia.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems