[]
Gets or sets the major unit scale for the category axis when CategoryType is TimeScale.
If the major unit is calculated automatically, this property returns the current base unit.
TimeUnit MajorUnitScale { get; set; }
Property MajorUnitScale As TimeUnit
worksheet.Range["A1:B4"].Value = new object[,] {
{"Date", "Sales"},
{45292d, 12},
{45323d, 18},
{45352d, 15}
};
IChart chart = worksheet.Shapes.AddChart(ChartType.ColumnClustered, 20, 20, 360, 220).Chart;
chart.SeriesCollection.Add(worksheet.Range["A1:B4"], RowCol.Columns, true, true);
IAxis axis = chart.Axes.Item(AxisType.Category, AxisGroup.Primary);
axis.CategoryType = CategoryType.TimeScale;
axis.MajorUnitScale = TimeUnit.Months;
TimeUnit majorUnitScale = axis.MajorUnitScale;