This is a migrated thread and some comments may be shown as answers.

Get data in chart from db

4 Answers 69 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Grtjn
Top achievements
Rank 1
Grtjn asked on 26 Feb 2010, 10:34 AM
My question is rather simple.
How can I draw a chart, using data from a database(SQL).
Is there any code available on the site? Or is there anyone who has done this and wants to share his code?

Grts,

Gertjan

4 Answers, 1 is accepted

Sort by
0
Bartholomeo Rocca
Top achievements
Rank 1
answered on 26 Feb 2010, 02:54 PM
Hello there,

You can check the databinding documentation to get you started (you will basically need web services to connect to your database) -- databinding to WCF service and databinding to ADO.NET data service.

Also, you can check the databinding example here.


Hope this helps,
Bart.

0
Grtjn
Top achievements
Rank 1
answered on 01 Mar 2010, 09:07 AM
Hi again,

I have been trying the "Data Binding to ADO.NET Service".
But I am not able to get the code correct. Is there any way I can get the full code of this + a tutorial how to do so?

Greets,

Gj
0
Grtjn
Top achievements
Rank 1
answered on 01 Mar 2010, 09:43 AM
Hi again,

I encountered another problem. How can I add an ADO Service when using a silverlight application?
When I want to add ADO.NET Entity Data Model or ADO.NET Data Service this isn't possible when using Silverlight application.
Any help plz !

Gj
0
Bartholomeo Rocca
Top achievements
Rank 1
answered on 04 Mar 2010, 08:20 AM
Hello again,

I believe there is nothing specific about the chart control when databinding it to ADO.NET Data Service (i.e. the plumbing code would be the same as if you were databinding MS Silverlight DataGrid, RadChart only needs enumerable ItemsSource set in the end). You can check this general topic on consuming ADO.NET Data Services in Silverlight, also there is extensive documentation on the same topic in MSDN as well.

  The DataBinding example I referenced in my previous reply actually demonstrates databinding to ADO.NET Data Service so you can check the relevant code in your local installation of the Silverlight examples as well.


Greetings,
Bart.
Tags
Chart
Asked by
Grtjn
Top achievements
Rank 1
Answers by
Bartholomeo Rocca
Top achievements
Rank 1
Grtjn
Top achievements
Rank 1
Share this question
or