Data Binding to Dates on XAxis

Thread is closed for posting
3 posts, 0 answers
  1. Pete
    Pete avatar
    31 posts
    Member since:
    May 2008

    Posted 13 May 2008 Link to this post

    Hi, is it possible to bind to a date from a .NET datatable. I have two values I need for Value and Date, I am doing something like

    //Define the Items in the Series

    for (int i = 0; i < results.Rows.Count; i++)

    {

    DataRow resultRow = results.Rows[i];

    RRChartSeries1.AddItem(

    double.Parse(results.Rows[i]["ObservationValue"].ToString()));

    RadChart1.PlotArea.XAxis.DataLabelsColumn = resultRow[

    "ObservationDate"].ToString();

    }

    But this doesn't bind the whole date, is there another way of doing this ?

  2. Ves
    Admin
    Ves avatar
    2926 posts

    Posted 13 May 2008 Link to this post

    Hi Pete,

    You need to set XValue for each ChartSeriesItem, rather than setting XAxis.DataLabelsColumn. This is shown here.

    Kind regards,
    Ves
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Pete
    Pete avatar
    31 posts
    Member since:
    May 2008

    Posted 13 May 2008 Link to this post

    Thanks for the reply, I will try that now
Back to Top