Create a simple line chart...

3 posts, 0 answers
  1. jfkrueger
    jfkrueger avatar
    269 posts
    Member since:
    Jul 2012

    Posted 19 Nov 2011 Link to this post

    I am needing to create a simple line chart with decimal values for the y-axis, years on the x-axis and several data series. Pretty much just like the one in the Charts "First Look" example (chart on lower left). My only problem is that I have no idea how the data is supposed to be structed in silverlight for this to work. Could someone please provide an example of this type of chart so I can see how the data is being structured that is set to the charts ItemsSource? Nothing is working for me, I have tried the DataTable and creating my own data object, but the year is never displayed along the x-axis and there is always only 1 series.

  2. Petar Marchev
    Petar Marchev avatar
    1029 posts

    Posted 23 Nov 2011 Link to this post

    Hi Joe,

    You can check our line chart demos here.
    In the upright corner you have an Example tab and a Code tab where you can check out the code to the examples.

    If you have installed the Telerik Silverlight Controls you should have all the examples under you local installation path i.e. C:\Program Files (x86)\Telerik
    There you should see a folder named  "RadControls for Silverlight Q2 2011 SP1" for example depending on the controls' version that you have installed.
    There you should see a "Demos" folder which contains a VS solution "ExamplesCS_SL.sln".

    RadChart provides full support of DateTime values and allows you to show dates on the X-Axis. You can find more information about this here.

    Most of our demos use the MVVM pattern to set the ItemsSource. There are plenty of resources online that should make you familiar with the MVVM. For example this information about MVVM on MSDN.

    If you have more questions about our controls we'll be happy to assist you.

    Petar Marchev
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  3. jfkrueger
    jfkrueger avatar
    269 posts
    Member since:
    Jul 2012

    Posted 23 Nov 2011 Link to this post

    Thanks, yeah I have your samples downloaded but they won't build so I don't really get to see how the data is structured. I figured it out though using the Simple Filtering example. Thanks!
Back to Top