Get data in chart from db

5 posts, 0 answers
  1. Grtjn
    Grtjn avatar
    129 posts
    Member since:
    Feb 2010

    Posted 26 Feb 2010 Link to this post

    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
  2. Bartholomeo Rocca
    Bartholomeo Rocca avatar
    247 posts
    Member since:
    May 2006

    Posted 26 Feb 2010 Link to this post

    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.

  3. Grtjn
    Grtjn avatar
    129 posts
    Member since:
    Feb 2010

    Posted 01 Mar 2010 Link to this post

    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
  4. Grtjn
    Grtjn avatar
    129 posts
    Member since:
    Feb 2010

    Posted 01 Mar 2010 Link to this post

    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
  5. Bartholomeo Rocca
    Bartholomeo Rocca avatar
    247 posts
    Member since:
    May 2006

    Posted 04 Mar 2010 Link to this post

    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.
Back to Top