Hi,
I'm struggling with a problem from a long time. I've the following data. I'm using version 9.1 of Infragistics charts.
DataTable dt = new DataTable(); dt.Columns.Add("Month", typeof(System.DateTime)); dt.Columns.Add("Min", typeof(System.Int16)); dt.Columns.Add("Max", typeof(System.Int16)); dt.Rows.Add(new object[] { DateTime.Parse("01-01-2012"), 0, 0 }); dt.Rows.Add(new object[] { DateTime.Parse("01-02-2012"), 30, 60 }); dt.Rows.Add(new object[] { DateTime.Parse("01-03-2012"), 0, 0 }); dt.Rows.Add(new object[] { DateTime.Parse("01-04-2012"), 23, 72 }); dt.Rows.Add(new object[] { DateTime.Parse("01-15-2012"), 67, 12 }); dt.Rows.Add(new object[] { DateTime.Parse("01-16-2012"), 57, 92 }); dt.Rows.Add(new object[] { DateTime.Parse("01-14-2012"), 23, 72 }); dt.Rows.Add(new object[] { DateTime.Parse("01-18-2012"), 67, 12 }); dt.Rows.Add(new object[] { DateTime.Parse("01-20-2012"), 57, 92 });
I want to display a month chart programmatically using C#.
How to display all the dates in x axis whether data table includes those dates or not.
Please share example asap.
Thanks
Hello Mohan,
Thank you for contacting Infragistics!
I recommend you see the following documentation it goes over having DateTime axis:
http://help.infragistics.com/doc/ASPNET/2014.2/CLR4.0/?page=Chart_Display_Data_on_a_Time_Scale_Axis.html
http://help.infragistics.com/doc/ASPNET/2014.2/CLR4.0/?page=Chart_Display_Labels_at_Intervals_on_a_Time_Scale_Axis.html
Please let me know if you have any further questions concerning this matter.
Thanks Mike, Can we achieve same functionality in column chart? I think column chart doesn't support such time frame functionality.
Thank you for the update. As you can see from the following link this is supported in the listed chart types at the top:
Currently the only way to achieve this behavior with the column chart type would be to have a category/value for each date you wanted to display.