Define Xaxis and Yaxis from a list

6 posts, 0 answers
  1. Martijn
    Martijn avatar
    16 posts
    Member since:
    Apr 2007

    Posted 18 Jul 2007 Link to this post

    I have a list containing objects ' Customers' . Each object contains an Id, Name, Date and NumberOfOrders.

    Now i want the Xaxis spread out each customers and the Yaxis represent the NumberOfOrders.

    radChart.DataSource = (list) Customers; 
    * radChart.Xaxis = customers.id; * 
    * radChart.Yaxis = customers.numberOfOrders; * 
    radChart.Databind(); 
     
     


    How can i do this in C# code?
  2. Dwight
    Admin
    Dwight avatar
    475 posts

    Posted 19 Jul 2007 Link to this post

    Hi Martijn,

    Please, excuse us for the delayed replay. The following code should do the trick:

    radChart1.DataSource = customers; 
    radChart1.DataManager.ValuesYColumns = new string[] {"numberOfOrders"}; 
    radChart1.PlotArea.XAxis.DataLabelsColumn = "id"

    If you have any other problems regarding our controls, just write us back.

     
    Regards,
    Evtim
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Martijn
    Martijn avatar
    16 posts
    Member since:
    Apr 2007

    Posted 26 Jul 2007 Link to this post

    This did the trick to define the Y-axis data, but somehow the colums are not printed right. The first five colums are placed in one column:

    [img]http://www.vandeel.com/meuk/radGraph.jpg[/img]
    http://www.vandeel.com/meuk/radGraph.jpg

    According to this there are five sessions made, but there is only one session needed.
    How can i fix this?
  5. Vladimir Milev
    Admin
    Vladimir Milev avatar
    1061 posts

    Posted 30 Jul 2007 Link to this post

    Hello martijntijn,

    Can you please provide us with a sample database (preferably ms access) that we can use to reproduce this behavior?

    All the best,
    Vladimir Milev
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. Martijn
    Martijn avatar
    16 posts
    Member since:
    Apr 2007

    Posted 31 Jul 2007 Link to this post

    I`m using a SQL 2005 database.

    I`m posting a screenshot from the database:
    [img]http://www.vandeel.com/meuk/ReportsSqlDatabase.png[/img]
    ReportsSqlDatabase.png
  7. Dwight
    Admin
    Dwight avatar
    475 posts

    Posted 03 Aug 2007 Link to this post

    Hi  Martijn,

    We could not reproduce the issue. Could you, please, provide us with a sample application which exposes the incorrect behavior.

    Check the demo project, it works fine.

    Greetings,
    Evtim
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top
UI for WinForms is Visual Studio 2017 Ready