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

Chart -Datasource and Datetime

1 Answer 38 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Scott Bergeman
Top achievements
Rank 1
Scott Bergeman asked on 10 Oct 2010, 10:52 PM
I have been struggling with this for a while. I want to connect the ASP  radchart to a datasource (Sql Server) and have the x-axis display time date values. For fun I tried Microsofts asp:chart, no problem. Then I tried DevExpress demo, no problem. From what I can find on the forum, it seems the RadChart cannot display dates without using toOADate() which means I have to iterate through the values?

Do you have an example showing the RadChart connected to a database with datetime values for the x axis?

The fact that it was so simple with Microsofts Char and DevExpress makes me think that I am simply missing something.

Thanks,
Scott

1 Answer, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 13 Oct 2010, 12:21 PM
Hi Scott Bergeman,

I am afraid, it is true that RadChart does not have a native support for DateTime values. Still, you would not need to iterate through the values. You can convert DateTime values within your query like this:
"SELECT [Value], CAST([Date] AS FLOAT) + 2 as float_date FROM [Table_1]"

Please, find this discussed in more details in this forum thread.

Best regards,
Ves
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Chart (Obsolete)
Asked by
Scott Bergeman
Top achievements
Rank 1
Answers by
Ves
Telerik team
Share this question
or