assign Date to x and y axis value in RadChart

Thread is closed for posting
2 posts, 0 answers
  1. Saravanan
    Saravanan avatar
    12 posts
    Member since:
    Aug 2010

    Posted 18 Aug 2011 Link to this post

    DataTable tbl = new DataTable();

    Hello telerik team, i have a table with the above structure. i need to draw a chart for the above data. the value for xaxis are in date format and y axis in string format. if i bind this datatable to RadChart object i'm getting empty series. It is accepting only numbers. Is it a limitation or i did any mistake?. And even if i give as numbers i need to group chart by series . the value for Legend should get from "SeriesName" column. Can someone help me.
  2. Evgenia
    Evgenia avatar
    1437 posts

    Posted 23 Aug 2011 Link to this post

    Hello Saravanan,

    There are some things you should have in mind when binding RadChart - both XAxis and YAxis expect their values to be of Double type. This means that dates should be presented in their OLE Automation equivalent using the ToOADate() method provided by the Framework. You may find our Numerical Axis demo helpful for achieving this. On the other hand to set strings as Labels for the Axis you may either set the DataLabelsColumn property or add the labels manually as shown here.
    You can set Series Name which will appear as Legend Item like this:
    radChart.Series[0].Name = "SeriesName";

    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Back to Top