I am using a devexpress xtrachart in which in x-axis there is date. Now, the date in x-axis I am binding from database as: y-axis has values
chartControl1.DataSource=dt;//used datatable
chartControl1.SeriesDataMember = "VariableName";
chartControl1.SeriesTemplate.ArgumentDataMember = "LastTime";
chartControl1.SeriesTemplate.ValueDataMembers.AddRange(new string[] { "LastValue" });
chartControl1.SeriesTemplate.ChangeView(ViewType.Line);
((DevExpress.XtraCharts.XYDiagram)(chartControl1.Diagram)).AxisX.Label.DateTimeOptions.Format = DateTimeFormat.General;
Now, the datetime in database is for today date and different hours like
but in chart its showing like below only one datetime:
How can i fix this, I just want it to show today's datetime(and time not as 00:00:00) That is if for today range in x-axis must be like: startdate in x-axis one hour before current datetime and enddate in x-axis one hour after current datetime or one hour difference
example if current datetime is 2014-10-11 10:00:00 in x-axis it show like 2014-10-11 09:00:00 , 2014-10-11 10:00:00 , 2014-10-11 11:00:00 ..
I tried VisualRange and WholeRange too but its not working.