I currently have a work book with two sheets one with graph data and one with a chart. I would like to construct a chart with the data from the other sheet. I am currently sending an attachment of teh excel sheet and the code I have left in teh comments so as to give you a fair idea as to what are the thing I have tried. My issues here is i want the x-axis to disply dates by months appart
I mean if i have 13 enteries of date values spread over 6 months then i want the x-axis to go display only 6 months and the graph to be spread out
//Set properties of nseries
//chart.CategoryAxis.CategoryType = CategoryType.TimeScale;
chart.NSeries.CategoryData = (HIDDEN_DATA + category);
//chart.AutoSacling = false;
chart.PlotArea.Area.ForegroundColor = Color.Transparent;
chart.PlotArea.Border.IsVisible = false;
int pax = chart.PlotArea.X;
int pay = chart.PlotArea.Y;
//Set Properties of categoryaxis title
chart.CategoryAxis.CategoryType = CategoryType.TimeScale;
////chart.CategoryAxis.BaseUnitScale = TimeUnit.Months;
chart.CategoryAxis.MajorUnitScale = TimeUnit.Months;
chart.CategoryAxis.MajorUnit = 1;
////chart.CategoryAxis.MinorUnitScale = TimeUnit.Days;
////chart.CategoryAxis.MinorUnit = 30;
////chart.CategoryAxis.MinValue = Convert.ToDateTime(wb.Worksheets[HIDDEN_DATA].Cells[_dateStartCell].Value);
//////chart.CategoryAxis.MinValue = 40140;
////chart.CategoryAxis.MaxValue = Convert.ToDateTime(wb.Worksheets[HIDDEN_DATA].Cells[_dateEndCell].Value);
////////chart.CategoryAxis.MajorUnit = 30;
////////chart.CategoryAxis.MinorUnit = 7;
Any reply would be kindly appreciated.