This is a migrated thread and some comments may be shown as answers.

Data Binding to Dates on XAxis

2 Answers 78 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Pete
Top achievements
Rank 1
Pete asked on 13 May 2008, 09:39 AM
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 Answers, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 13 May 2008, 11:13 AM
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
0
Pete
Top achievements
Rank 1
answered on 13 May 2008, 12:58 PM
Thanks for the reply, I will try that now
Tags
Chart (Obsolete)
Asked by
Pete
Top achievements
Rank 1
Answers by
Ves
Telerik team
Pete
Top achievements
Rank 1
Share this question
or