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

Rad chart binding with complex object with date

1 Answer 79 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
vishesh kumar
Top achievements
Rank 1
vishesh kumar asked on 28 Mar 2011, 03:49 PM
Hi,

I need to create a chart with the following properties:
  1. On the y axis, i need to show an integer say score
  2. On the x axis, i need to display the month on which the score was posted. The x axis can be static also and contain all the months.

I have a complex object which has both score and date attributes.

how can this be achieved? I am not able to find a solution for this problem. It is not present in a demo also.

Please help!

Thanks in advance
Vishesh

1 Answer, 1 is accepted

Sort by
0
Missing User
answered on 31 Mar 2011, 10:08 AM
Hello vishesh kumar,

In order to displays database column data in the X axis labels you need to assign the column name to the RadChart1.PlotArea.XAxis.DataLabelsColumn property. You can review the "Data Binding RadChart to a Database Object" help topic and the online demo here:
http://www.telerik.com/help/aspnet-ajax/buildingdatabinddatabase.html
http://demos.telerik.com/aspnet-ajax/chart/examples/databinding/xml/defaultcs.aspx

 When you want to display DateTime values on the X Axis, you need to convert them to their OLE Automation equivalents using ToOADate(). You can find the example here. You can also add Axis labels programmatically, as described in this help topic.

I hope this helps.

Kind regards,
Polina
the Telerik team
Tags
Chart (Obsolete)
Asked by
vishesh kumar
Top achievements
Rank 1
Answers by
Missing User
Share this question
or