8 Answers, 1 is accepted
RadHtmlChart and RadGantt are actually two separate controls. You can find the demos and documentation of both controls below:
- RadHtmlChart docs - http://www.telerik.com/help/aspnet-ajax/htmlchart-overview.html
- RadHtmlChart demos - http://demos.telerik.com/aspnet-ajax/htmlchart/examples/overview/defaultcs.aspx
- RadGantt docs - http://www.telerik.com/help/aspnet-ajax/gantt-overview.html
- RadGantt demos - http://demos.telerik.com/aspnet-ajax/gantt/examples/overview/defaultcs.aspx
Regarding an integration of both controls I am sorry to say we do not have an official sample to offer.
See What's Next in App Development. Register for TelerikNEXT.
I have developed a gantt view using RadChart with resource name on X-axis and dates on y Axis. By default dates on Y axis are being displayed at the bottom. Can you please tell me how to display dates on Y-axis at the top.
Suresh, we are trying to do the same but cannot even figure out how to do this. In their docs, they have X and Y axis reversed, and the Y axis only supports numbers and not dates.
How have you managed to get dates to display?
Also, were you able to get them to display at the top?
Thank you for your help.
Can you please help answer the question of how to get the dates to the top?
And for me, could you tell me how to even get dates on the Y axis (that actually displays along the X axis).
The y-axis doesn't support dates by default. You can, however, try to convert the dates to numbers and after that format them back to date on the client-side - http://docs.telerik.com/devtools/aspnet-ajax/controls/htmlchart/how-to/programmatic-creation-of-seriesitems-with-datetime
Please change YAxisType to secondary a shown below:
RadChart1.Series.Appearance.LabelAppearance.Visible = false;
RadChart1.Series.YAxisType = ChartYAxisType.Secondary;
RadChart1.Series.DataXColumn = "RowID";
RadChart1.Series.DataYColumn = "FromDate";
RadChart1.Series.DataYColumn2 = "ToDate";
RadChart1.Series.DataLabelsColumn = "ResourceName";
RadChart1.SeriesOrientation = ChartSeriesOrientation.Horizontal;
Configure all settings like Step, AutoScale, MinValue, MaxValue for RadChart1.PlotArea.YAxis2.
In the ItemDataBound of chart, clear X axis items first and then build X axis items as per your requirement.
Please go through below link which shows how to add X axis items in ItemDataBound:
I would like to note a few things:
- RadHtmlChart is not designed to create Gantt charts
- Thus, we advise you use the RadGantt control because it is specialized for this purpose: http://demos.telerik.com/aspnet-ajax/gantt/examples/overview/defaultcs.aspx.
- RadChart is obsolete and is not supported: http://www.telerik.com/blogs/radhtmlchart-vs-radchart-round3-radchart-is-obsolete.