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

RadGrid and Chat

1 Answer 157 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Praveen
Top achievements
Rank 1
Praveen asked on 13 Jan 2011, 10:45 AM
1) I'm succeeded to show Radchart as a template column in Radgrid and Series Orientation="Horizontal". here  I want to display time interval (half hour difference (0,0:30,1:00)) in X axis, for this, I followed your code snippet  chart.Series(0).Add Item(Date Time.Now.Hour Mod 30) and it is displaying from 0 to current time with interval 2 hours.
2)I dont want to display Y axis values.
The above one is stacked rad chart.

3) Based on the time value from database I need to change color on stacked bar at particular place with exact time value in X axis.

Could you please suggest me how to achieve it and would be appreciate if you provide some example

1 Answer, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 18 Jan 2011, 04:00 PM
Hello Praveen,

1) To be able to show half hour time interval you can use this demo's source code and set the XAxis Range like this:
const double halfHourStep = 0.5 / 24.0; //  assuming that 1/24.0 is one hour
  double startTime = new DateTime(2008, 1, 1, 8, 0, 0, 0).ToOADate();
  double endTime = new DateTime(2008, 1, 1, 17, 0, 0, 0).ToOADate();
 RadChart1.PlotArea.XAxis.AutoScale="false";
 RadChart1.PlotArea.XAxis.AddRange(startTime, endTime, hourStep);
Have in mind that when changing the SeriesOrientation to Horizontal the XAxis and YAxis are rotated - the YAxis is the abscess and the XAxis is the ordinate.

2) I'm assuming that you want to make XAxis invisible (your SeriesOrientation is Horizontal). Here is how you can achieve this:
RadChart1.PlotArea.XAxis.Appearance.Visible = Telerik.Charting.Styles.ChartAxisVisibility.False;

3) Have in mind that Bars in StackedBar Series have different color depending on their Series. For more information about StackedBars please review our demo - http://demos.telerik.com/aspnet-ajax/chart/examples/skinning/bars/defaultcs.aspx
 
Greetings,
Evgenia
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Grid
Asked by
Praveen
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Share this question
or