Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Getting Started: Visual Studio and SharePoint 2010 > Create Custom Chart with data from SharePoint List

Posted on 2013-05-10
11
157 Views
Last Modified: 2015-01-29
Hi,

Would appreciate it very much your help to point me to the resource sites ( with sample code, if possible )  to get started on the following:

Using Visual Studio 2012 to create web part / solution that can be deployed in SharePoint 2010,  to create custom chart with SharePoint List(s).

Would specifically like to cover the following items:
1. Visual C#
2. References  to include System.Web.UI.DataVisualization.Charting, System.Data,  .DataSource, .DataBind


Thank you.
0
Comment
Question by:Russellbrown
  • 5
  • 4
11 Comments
 
LVL 44

Accepted Solution

by:
Rainer Jeschor earned 500 total points
ID: 39156995
Hi,
one very good video about VS2012 and SP2010 as starter:
http://channel9.msdn.com/Events/TechEd/NorthAmerica/2012/OSP231/player

HTH
Rainer
0
 

Author Comment

by:Russellbrown
ID: 39158011
Thank you for the link and it is very informative.

Would you have a sample code or point me to a site with such a code,  for building  a web part to generate a chart with the following conditions:

1) datasource: a SharePoint List,
2) Visual C#
3) utilising Visual Web Part,
4) sandboxed solution,

Environment: Visual Studio 2012, SharePoint 2012

Thank you.
0
 

Author Comment

by:Russellbrown
ID: 39161263
Hi,

I managed to sample a code and able to obtain an array of the x and y values for the chart i.e.  SPListItemCollection itemColl = list.GetItems(query);
How do I debug ( similar to debug.print in VBA  immediate window e.g. ?sales(1)  * ) by printing out an element of the array to either Output / Immediate window in Visual Studio 2012 using C#?

The series in the list are:
Product:        P1   P2   P3 .....
Sales:            50  100  150

the 1st element of the array will be P1, 50.

--------------------------------------------------------------
*The VBA code is something along this line:
Option Explicit
Option Base 1 ' start indexing array elements at 1
Dim sales() As String
Dim item As Variant

and the array is ( 50, 100, 150 )
.....Each item In sales ..........
?sales(1) = 50
?sales(2) = 100


Thank you.
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 44

Expert Comment

by:Rainer Jeschor
ID: 39402145
Hi,
you will have to attach to the W3P process of your SharePoint web app and use
System.Diagnostics.Debug.Write or
System.Diagnostics.Debug.WriteLine
to print to the immediate window.

HTH
Rainer
0
 

Author Comment

by:Russellbrown
ID: 39413550
Hi,

Thank you for the reply. Will work on it. I have paused for a while but will be getting back into this assignment. Will revert in a week's time with the result.

Regards,
Russ
0
 
LVL 19

Expert Comment

by:Amandeep Singh Bhullar
ID: 40576787
I've requested that this question be deleted for the following reason:

Not enough information to confirm an answer.
0
 
LVL 44

Expert Comment

by:Rainer Jeschor
ID: 40576788
I do not agree with the Deletion.
The original request has been for a resource to start development. This request has been fulfilled as the creator made it to develop the solution.
Then he asked the question for debugging - which is an extension of the original one.
Therefore imho the first answer can be seen as successful.
KR
Rainer
0
 

Author Comment

by:Russellbrown
ID: 40576837
Agree with Rainer. It has been a while and  was looking on another aspect of a project and missed closing this case. Will be happy to take the first answer as good. Regards.
0
 
LVL 44

Expert Comment

by:Rainer Jeschor
ID: 40576854
@Russellbrown: thank you very much - I really appreciate your support!
0
 

Author Closing Comment

by:Russellbrown
ID: 40576993
The pointer has helped to get me started looking further into the issue.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
We had a requirement to extract data from a SharePoint 2010 Customer List into a CSV file and then place the CSV file into a directory on the network so that the file could be consumed by an AS400 system. I will share in Part 1 how to Extract the Da…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question