Interface IOfficeChartCategoryAxis
Represents the chart Category Axis.
Inherited Members
Namespace: Syncfusion.OfficeChart
Assembly: Syncfusion.OfficeChart.Base.dll
Syntax
public interface IOfficeChartCategoryAxis : IOfficeChartValueAxis, IOfficeChartAxis
Properties
AutoTickLabelSpacing
Gets or sets a value that indicates whether the tick label spacing is automatic.
Declaration
bool AutoTickLabelSpacing { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "2010");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "2011");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "2012");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Create a new chart series with the name
IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
//Set the data range of chart serie � start row, start column, end row, end column
serieFeb.Values = chart.ChartData[2, 3, 4, 3];
//Create a new chart series with the name
IOfficeChartSerie serieMarch = chart.Series.Add("March");
//Set the data range of chart series � start row, start column, end row, end column
serieMarch.Values = chart.ChartData[2, 4, 4, 4];
//Get the primary category axis of chart
IOfficeChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis;
//Set the auto tick label spacing
categoryAxis.AutoTickLabelSpacing = false;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
'Create a presentation instance
Dim presentation__1 As IPresentation = Presentation.Create()
'Add a blank slide to the presentation
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Add chart to the slide with position and size
Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
'Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan")
chart.ChartData.SetValue(1, 3, "Feb")
chart.ChartData.SetValue(1, 4, "March")
'Set chart data - Row2
chart.ChartData.SetValue(2, 1, "2010")
chart.ChartData.SetValue(2, 2, "60")
chart.ChartData.SetValue(2, 3, "70")
chart.ChartData.SetValue(2, 4, "80")
'Set chart data - Row3
chart.ChartData.SetValue(3, 1, "2011")
chart.ChartData.SetValue(3, 2, "80")
chart.ChartData.SetValue(3, 3, "70")
chart.ChartData.SetValue(3, 4, "60")
'Set chart data - Row4
chart.ChartData.SetValue(4, 1, "2012")
chart.ChartData.SetValue(4, 2, "60")
chart.ChartData.SetValue(4, 3, "70")
chart.ChartData.SetValue(4, 4, "80")
'Create a new chart series with the name
Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
'Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData(2, 2, 4, 2)
'Create a new chart series with the name
Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
'Set the data range of chart serie � start row, start column, end row, end column
serieFeb.Values = chart.ChartData(2, 3, 4, 3)
'Create a new chart series with the name
Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
'Set the data range of chart series � start row, start column, end row, end column
serieMarch.Values = chart.ChartData(2, 4, 4, 4)
'Get the primary category axis of chart
Dim categoryAxis As IOfficeChartCategoryAxis = chart.PrimaryCategoryAxis
'Set the auto tick label spacing
categoryAxis.AutoTickLabelSpacing = False
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation
presentation__1.Close()
BaseUnit
Gets or sets the base unit for the category axis
Declaration
OfficeChartBaseUnit BaseUnit { get; set; }
Property Value
Type |
---|
OfficeChartBaseUnit |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "9/21/2015");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "9/24/2015");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "9/28/2015");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Create a new chart series with the name
IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
//Set the data range of chart serie � start row, start column, end row, end column
serieFeb.Values = chart.ChartData[2, 3, 4, 3];
//Create a new chart series with the name
IOfficeChartSerie serieMarch = chart.Series.Add("March");
//Set the data range of chart series � start row, start column, end row, end column
serieMarch.Values = chart.ChartData[2, 4, 4, 4];
//Get the primary category axis of chart
IOfficeChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis;
//Set the category labels
categoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
//Set the number format of axis
categoryAxis.NumberFormat = "m/d/yyyy";
//Set the base unit
categoryAxis.BaseUnit = OfficeChartBaseUnit.Month;
//Set the base unit for the category axis, default is true
categoryAxis.BaseUnitIsAuto = false;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
'Create a presentation instance
Dim presentation__1 As IPresentation = Presentation.Create()
'Add a blank slide to the presentation
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Add chart to the slide with position and size
Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
'Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan")
chart.ChartData.SetValue(1, 3, "Feb")
chart.ChartData.SetValue(1, 4, "March")
'Set chart data - Row2
chart.ChartData.SetValue(2, 1, "9/21/2015")
chart.ChartData.SetValue(2, 2, "60")
chart.ChartData.SetValue(2, 3, "70")
chart.ChartData.SetValue(2, 4, "80")
'Set chart data - Row3
chart.ChartData.SetValue(3, 1, "9/24/2015")
chart.ChartData.SetValue(3, 2, "80")
chart.ChartData.SetValue(3, 3, "70")
chart.ChartData.SetValue(3, 4, "60")
'Set chart data - Row4
chart.ChartData.SetValue(4, 1, "9/28/2015")
chart.ChartData.SetValue(4, 2, "60")
chart.ChartData.SetValue(4, 3, "70")
chart.ChartData.SetValue(4, 4, "80")
'Create a new chart series with the name
Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
'Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData(2, 2, 4, 2)
'Create a new chart series with the name
Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
'Set the data range of chart serie � start row, start column, end row, end column
serieFeb.Values = chart.ChartData(2, 3, 4, 3)
'Create a new chart series with the name
Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
'Set the data range of chart series � start row, start column, end row, end column
serieMarch.Values = chart.ChartData(2, 4, 4, 4)
'Get the primary category axis of chart
Dim categoryAxis As IOfficeChartCategoryAxis = chart.PrimaryCategoryAxis
'Set the category labels
categoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
'Set the number format of axis
categoryAxis.NumberFormat = "m/d/yyyy"
'Set the base unit
categoryAxis.BaseUnit = OfficeChartBaseUnit.Month
'Set the base unit for the category axis, default is true
categoryAxis.BaseUnitIsAuto = False
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation
presentation__1.Close()
BaseUnitIsAuto
Gets or sets True if use automatic base units for the category axis. The default is true.
Declaration
bool BaseUnitIsAuto { get; set; }
Property Value
Type |
---|
System.Boolean |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "9/21/2015");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "9/24/2015");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "9/28/2015");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Create a new chart series with the name
IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
//Set the data range of chart serie � start row, start column, end row, end column
serieFeb.Values = chart.ChartData[2, 3, 4, 3];
//Create a new chart series with the name
IOfficeChartSerie serieMarch = chart.Series.Add("March");
//Set the data range of chart series � start row, start column, end row, end column
serieMarch.Values = chart.ChartData[2, 4, 4, 4];
//Get the primary category axis of chart
IOfficeChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis;
//Set the category labels
categoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
//Set the number format of axis
categoryAxis.NumberFormat = "m/d/yyyy";
//Set the base unit
categoryAxis.BaseUnit = OfficeChartBaseUnit.Month;
//Set the base unit for the category axis, default is true
categoryAxis.BaseUnitIsAuto = false;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
'Create a presentation instance
Dim presentation__1 As IPresentation = Presentation.Create()
'Add a blank slide to the presentation
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Add chart to the slide with position and size
Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
'Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan")
chart.ChartData.SetValue(1, 3, "Feb")
chart.ChartData.SetValue(1, 4, "March")
'Set chart data - Row2
chart.ChartData.SetValue(2, 1, "9/21/2015")
chart.ChartData.SetValue(2, 2, "60")
chart.ChartData.SetValue(2, 3, "70")
chart.ChartData.SetValue(2, 4, "80")
'Set chart data - Row3
chart.ChartData.SetValue(3, 1, "9/24/2015")
chart.ChartData.SetValue(3, 2, "80")
chart.ChartData.SetValue(3, 3, "70")
chart.ChartData.SetValue(3, 4, "60")
'Set chart data - Row4
chart.ChartData.SetValue(4, 1, "9/28/2015")
chart.ChartData.SetValue(4, 2, "60")
chart.ChartData.SetValue(4, 3, "70")
chart.ChartData.SetValue(4, 4, "80")
'Create a new chart series with the name
Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
'Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData(2, 2, 4, 2)
'Create a new chart series with the name
Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
'Set the data range of chart serie � start row, start column, end row, end column
serieFeb.Values = chart.ChartData(2, 3, 4, 3)
'Create a new chart series with the name
Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
'Set the data range of chart series � start row, start column, end row, end column
serieMarch.Values = chart.ChartData(2, 4, 4, 4)
'Get the primary category axis of chart
Dim categoryAxis As IOfficeChartCategoryAxis = chart.PrimaryCategoryAxis
'Set the category labels
categoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
'Set the number format of axis
categoryAxis.NumberFormat = "m/d/yyyy"
'Set the base unit
categoryAxis.BaseUnit = OfficeChartBaseUnit.Month
'Set the base unit for the category axis, default is true
categoryAxis.BaseUnitIsAuto = False
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation
presentation__1.Close()
BinWidth
Get or Set the number of data points in each range.
Declaration
double BinWidth { get; set; }
Property Value
Type |
---|
System.Double |
Remarks
Applies only to Histogram and Pareto charts.
CategoryLabels
Gets or sets Category labels for the chart.
Declaration
IOfficeDataRange CategoryLabels { get; set; }
Property Value
Type |
---|
IOfficeDataRange |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "9/21/2015");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "9/24/2015");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "9/28/2015");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Create a new chart series with the name
IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
//Set the data range of chart serie � start row, start column, end row, end column
serieFeb.Values = chart.ChartData[2, 3, 4, 3];
//Create a new chart series with the name
IOfficeChartSerie serieMarch = chart.Series.Add("March");
//Set the data range of chart series � start row, start column, end row, end column
serieMarch.Values = chart.ChartData[2, 4, 4, 4];
//Get the primary category axis of chart
IOfficeChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis;
//Set the category labels
categoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
//Set the number format of axis
categoryAxis.NumberFormat = "m/d/yyyy";
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
'Create a presentation instance
Dim presentation__1 As IPresentation = Presentation.Create()
'Add a blank slide to the presentation
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Add chart to the slide with position and size
Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
'Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan")
chart.ChartData.SetValue(1, 3, "Feb")
chart.ChartData.SetValue(1, 4, "March")
'Set chart data - Row2
chart.ChartData.SetValue(2, 1, "9/21/2015")
chart.ChartData.SetValue(2, 2, "60")
chart.ChartData.SetValue(2, 3, "70")
chart.ChartData.SetValue(2, 4, "80")
'Set chart data - Row3
chart.ChartData.SetValue(3, 1, "9/24/2015")
chart.ChartData.SetValue(3, 2, "80")
chart.ChartData.SetValue(3, 3, "70")
chart.ChartData.SetValue(3, 4, "60")
'Set chart data - Row4
chart.ChartData.SetValue(4, 1, "9/28/2015")
chart.ChartData.SetValue(4, 2, "60")
chart.ChartData.SetValue(4, 3, "70")
chart.ChartData.SetValue(4, 4, "80")
'Create a new chart series with the name
Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
'Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData(2, 2, 4, 2)
'Create a new chart series with the name
Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
'Set the data range of chart serie � start row, start column, end row, end column
serieFeb.Values = chart.ChartData(2, 3, 4, 3)
'Create a new chart series with the name
Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
'Set the data range of chart series � start row, start column, end row, end column
serieMarch.Values = chart.ChartData(2, 4, 4, 4)
'Get the primary category axis of chart
Dim categoryAxis As IOfficeChartCategoryAxis = chart.PrimaryCategoryAxis
'Set the category labels
categoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
'Set the number format of axis
categoryAxis.NumberFormat = "m/d/yyyy"
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation
presentation__1.Close()
CategoryType
Gets or sets the category axis type.
Declaration
OfficeCategoryType CategoryType { get; set; }
Property Value
Type |
---|
OfficeCategoryType |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "9/21/2015");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "9/24/2015");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "9/28/2015");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Create a new chart series with the name
IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
//Set the data range of chart serie � start row, start column, end row, end column
serieFeb.Values = chart.ChartData[2, 3, 4, 3];
//Create a new chart series with the name
IOfficeChartSerie serieMarch = chart.Series.Add("March");
//Set the data range of chart series � start row, start column, end row, end column
serieMarch.Values = chart.ChartData[2, 4, 4, 4];
//Get the primary category axis of chart
IOfficeChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis;
//Set the category labels
categoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
//Set the number format of axis
categoryAxis.NumberFormat = "m/d/yyyy";
//Set the category type
categoryAxis.CategoryType = OfficeCategoryType.Category;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
'Create a presentation instance
Dim presentation__1 As IPresentation = Presentation.Create()
'Add a blank slide to the presentation
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Add chart to the slide with position and size
Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
'Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan")
chart.ChartData.SetValue(1, 3, "Feb")
chart.ChartData.SetValue(1, 4, "March")
'Set chart data - Row2
chart.ChartData.SetValue(2, 1, "9/21/2015")
chart.ChartData.SetValue(2, 2, "60")
chart.ChartData.SetValue(2, 3, "70")
chart.ChartData.SetValue(2, 4, "80")
'Set chart data - Row3
chart.ChartData.SetValue(3, 1, "9/24/2015")
chart.ChartData.SetValue(3, 2, "80")
chart.ChartData.SetValue(3, 3, "70")
chart.ChartData.SetValue(3, 4, "60")
'Set chart data - Row4
chart.ChartData.SetValue(4, 1, "9/28/2015")
chart.ChartData.SetValue(4, 2, "60")
chart.ChartData.SetValue(4, 3, "70")
chart.ChartData.SetValue(4, 4, "80")
'Create a new chart series with the name
Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
'Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData(2, 2, 4, 2)
'Create a new chart series with the name
Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
'Set the data range of chart serie � start row, start column, end row, end column
serieFeb.Values = chart.ChartData(2, 3, 4, 3)
'Create a new chart series with the name
Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
'Set the data range of chart series � start row, start column, end row, end column
serieMarch.Values = chart.ChartData(2, 4, 4, 4)
'Get the primary category axis of chart
Dim categoryAxis As IOfficeChartCategoryAxis = chart.PrimaryCategoryAxis
'Set the category labels
categoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
'Set the number format of axis
categoryAxis.NumberFormat = "m/d/yyyy"
'Set the category type
categoryAxis.CategoryType = OfficeCategoryType.Category
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation
presentation__1.Close()
DirectCategoryLabels
Get or set the Directly category lables for the chart.
Declaration
object[] DirectCategoryLabels { get; set; }
Property Value
Type |
---|
System.Object[] |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 1, "Jan");
chart.ChartData.SetValue(1, 2, "Feb");
chart.ChartData.SetValue(1, 3, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "10");
chart.ChartData.SetValue(2, 2, "20");
chart.ChartData.SetValue(2, 3, "30");
///'Sets the data range of chart
chart.DataRange = chart.ChartData(1, 1, 2, 2)
//Get the primary category axis of chart
IOfficeChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis;
//Set the category labels
categoryAxis.DirectCategoryLabels = = new object[] { "Oct", "Nov", "Dec" };;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
HasAutomaticBins
True if bins generated are automatic. otherwise False
Declaration
bool HasAutomaticBins { get; set; }
Property Value
Type |
---|
System.Boolean |
Remarks
Applies only to Histogram and Pareto charts.
IsBetween
Gets or sets true - cuts unused plot area. Default for area, surface charts.
Declaration
bool IsBetween { get; set; }
Property Value
Type |
---|
System.Boolean |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "9/21/2015");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "9/24/2015");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "9/28/2015");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Create a new chart series with the name
IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
//Set the data range of chart serie � start row, start column, end row, end column
serieFeb.Values = chart.ChartData[2, 3, 4, 3];
//Create a new chart series with the name
IOfficeChartSerie serieMarch = chart.Series.Add("March");
//Set the data range of chart series � start row, start column, end row, end column
serieMarch.Values = chart.ChartData[2, 4, 4, 4];
//Get the primary category axis of chart
IOfficeChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis;
//Set the category labels
categoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
//Set the number format of axis
categoryAxis.NumberFormat = "m/d/yyyy";
//Set the tick label spacing
categoryAxis.TickLabelSpacing = 2;
//Set the tick mark spacing
categoryAxis.TickMarkSpacing = 2;
//Set IsBetween, default is true
categoryAxis.IsBetween = false;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
'Create a presentation instance
Dim presentation__1 As IPresentation = Presentation.Create()
'Add a blank slide to the presentation
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Add chart to the slide with position and size
Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
'Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan")
chart.ChartData.SetValue(1, 3, "Feb")
chart.ChartData.SetValue(1, 4, "March")
'Set chart data - Row2
chart.ChartData.SetValue(2, 1, "9/21/2015")
chart.ChartData.SetValue(2, 2, "60")
chart.ChartData.SetValue(2, 3, "70")
chart.ChartData.SetValue(2, 4, "80")
'Set chart data - Row3
chart.ChartData.SetValue(3, 1, "9/24/2015")
chart.ChartData.SetValue(3, 2, "80")
chart.ChartData.SetValue(3, 3, "70")
chart.ChartData.SetValue(3, 4, "60")
'Set chart data - Row4
chart.ChartData.SetValue(4, 1, "9/28/2015")
chart.ChartData.SetValue(4, 2, "60")
chart.ChartData.SetValue(4, 3, "70")
chart.ChartData.SetValue(4, 4, "80")
'Create a new chart series with the name
Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
'Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData(2, 2, 4, 2)
'Create a new chart series with the name
Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
'Set the data range of chart serie � start row, start column, end row, end column
serieFeb.Values = chart.ChartData(2, 3, 4, 3)
'Create a new chart series with the name
Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
'Set the data range of chart series � start row, start column, end row, end column
serieMarch.Values = chart.ChartData(2, 4, 4, 4)
'Get the primary category axis of chart
Dim categoryAxis As IOfficeChartCategoryAxis = chart.PrimaryCategoryAxis
'Set the category labels
categoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
'Set the number format of axis
categoryAxis.NumberFormat = "m/d/yyyy"
'Set the tick label spacing
categoryAxis.TickLabelSpacing = 2
'Set the tick mark spacing
categoryAxis.TickMarkSpacing = 2
'Set IsBetween, default is true
categoryAxis.IsBetween = False
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation
presentation__1.Close()
IsBinningByCategory
True if bins generated by category values. otherwise False
Declaration
bool IsBinningByCategory { get; set; }
Property Value
Type |
---|
System.Boolean |
Remarks
Applies only to Histogram and Pareto charts.
MajorUnitScale
Gets or sets the major unit scale value for the category axis when the CategoryType property is set to TimeScale.
Declaration
OfficeChartBaseUnit MajorUnitScale { get; set; }
Property Value
Type |
---|
OfficeChartBaseUnit |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "9/21/2015");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "9/24/2015");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "9/28/2015");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Create a new chart series with the name
IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
//Set the data range of chart serie � start row, start column, end row, end column
serieFeb.Values = chart.ChartData[2, 3, 4, 3];
//Create a new chart series with the name
IOfficeChartSerie serieMarch = chart.Series.Add("March");
//Set the data range of chart series � start row, start column, end row, end column
serieMarch.Values = chart.ChartData[2, 4, 4, 4];
//Get the primary category axis of chart
IOfficeChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis;
//Set the category labels
categoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
//Set the number format of axis
categoryAxis.NumberFormat = "m/d/yyyy";
//Set the base unit
categoryAxis.BaseUnit = OfficeChartBaseUnit.Month;
//Set the major unit scale
categoryAxis.MajorUnitScale = OfficeChartBaseUnit.Month;
//Set the minor unit scale
categoryAxis.MinorUnitScale = OfficeChartBaseUnit.Month;
//Set the minor unit
categoryAxis.MinorUnit = 10;
//Set the major unit
categoryAxis.MajorUnit = 10;
//Set the offset value
categoryAxis.Offset = 450;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
'Create a presentation instance
Dim presentation__1 As IPresentation = Presentation.Create()
'Add a blank slide to the presentation
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Add chart to the slide with position and size
Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
'Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan")
chart.ChartData.SetValue(1, 3, "Feb")
chart.ChartData.SetValue(1, 4, "March")
'Set chart data - Row2
chart.ChartData.SetValue(2, 1, "9/21/2015")
chart.ChartData.SetValue(2, 2, "60")
chart.ChartData.SetValue(2, 3, "70")
chart.ChartData.SetValue(2, 4, "80")
'Set chart data - Row3
chart.ChartData.SetValue(3, 1, "9/24/2015")
chart.ChartData.SetValue(3, 2, "80")
chart.ChartData.SetValue(3, 3, "70")
chart.ChartData.SetValue(3, 4, "60")
'Set chart data - Row4
chart.ChartData.SetValue(4, 1, "9/28/2015")
chart.ChartData.SetValue(4, 2, "60")
chart.ChartData.SetValue(4, 3, "70")
chart.ChartData.SetValue(4, 4, "80")
'Create a new chart series with the name
Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
'Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData(2, 2, 4, 2)
'Create a new chart series with the name
Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
'Set the data range of chart serie � start row, start column, end row, end column
serieFeb.Values = chart.ChartData(2, 3, 4, 3)
'Create a new chart series with the name
Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
'Set the data range of chart series � start row, start column, end row, end column
serieMarch.Values = chart.ChartData(2, 4, 4, 4)
'Get the primary category axis of chart
Dim categoryAxis As IOfficeChartCategoryAxis = chart.PrimaryCategoryAxis
'Set the category labels
categoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
'Set the number format of axis
categoryAxis.NumberFormat = "m/d/yyyy"
'Set the base unit
categoryAxis.BaseUnit = OfficeChartBaseUnit.Month
'Set the major unit scale
categoryAxis.MajorUnitScale = OfficeChartBaseUnit.Month
'Set the minor unit scale
categoryAxis.MinorUnitScale = OfficeChartBaseUnit.Month
'Set the minor unit
categoryAxis.MinorUnit = 10
'Set the major unit
categoryAxis.MajorUnit = 10
'Set the offset value
categoryAxis.Offset = 450
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation
presentation__1.Close()
MinorUnitScale
Gets or sets the minor unit scale value for the category axis when the CategoryType property is set to TimeScale.
Declaration
OfficeChartBaseUnit MinorUnitScale { get; set; }
Property Value
Type |
---|
OfficeChartBaseUnit |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "9/21/2015");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "9/24/2015");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "9/28/2015");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Create a new chart series with the name
IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
//Set the data range of chart serie � start row, start column, end row, end column
serieFeb.Values = chart.ChartData[2, 3, 4, 3];
//Create a new chart series with the name
IOfficeChartSerie serieMarch = chart.Series.Add("March");
//Set the data range of chart series � start row, start column, end row, end column
serieMarch.Values = chart.ChartData[2, 4, 4, 4];
//Get the primary category axis of chart
IOfficeChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis;
//Set the category labels
categoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
//Set the number format of axis
categoryAxis.NumberFormat = "m/d/yyyy";
//Set the base unit
categoryAxis.BaseUnit = OfficeChartBaseUnit.Month;
//Set the major unit scale
categoryAxis.MajorUnitScale = OfficeChartBaseUnit.Month;
//Set the minor unit scale
categoryAxis.MinorUnitScale = OfficeChartBaseUnit.Month;
//Set the minor unit
categoryAxis.MinorUnit = 10;
//Set the major unit
categoryAxis.MajorUnit = 10;
//Set the offset value
categoryAxis.Offset = 450;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
'Create a presentation instance
Dim presentation__1 As IPresentation = Presentation.Create()
'Add a blank slide to the presentation
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Add chart to the slide with position and size
Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
'Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan")
chart.ChartData.SetValue(1, 3, "Feb")
chart.ChartData.SetValue(1, 4, "March")
'Set chart data - Row2
chart.ChartData.SetValue(2, 1, "9/21/2015")
chart.ChartData.SetValue(2, 2, "60")
chart.ChartData.SetValue(2, 3, "70")
chart.ChartData.SetValue(2, 4, "80")
'Set chart data - Row3
chart.ChartData.SetValue(3, 1, "9/24/2015")
chart.ChartData.SetValue(3, 2, "80")
chart.ChartData.SetValue(3, 3, "70")
chart.ChartData.SetValue(3, 4, "60")
'Set chart data - Row4
chart.ChartData.SetValue(4, 1, "9/28/2015")
chart.ChartData.SetValue(4, 2, "60")
chart.ChartData.SetValue(4, 3, "70")
chart.ChartData.SetValue(4, 4, "80")
'Create a new chart series with the name
Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
'Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData(2, 2, 4, 2)
'Create a new chart series with the name
Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
'Set the data range of chart serie � start row, start column, end row, end column
serieFeb.Values = chart.ChartData(2, 3, 4, 3)
'Create a new chart series with the name
Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
'Set the data range of chart series � start row, start column, end row, end column
serieMarch.Values = chart.ChartData(2, 4, 4, 4)
'Get the primary category axis of chart
Dim categoryAxis As IOfficeChartCategoryAxis = chart.PrimaryCategoryAxis
'Set the category labels
categoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
'Set the number format of axis
categoryAxis.NumberFormat = "m/d/yyyy"
'Set the base unit
categoryAxis.BaseUnit = OfficeChartBaseUnit.Month
'Set the major unit scale
categoryAxis.MajorUnitScale = OfficeChartBaseUnit.Month
'Set the minor unit scale
categoryAxis.MinorUnitScale = OfficeChartBaseUnit.Month
'Set the minor unit
categoryAxis.MinorUnit = 10
'Set the major unit
categoryAxis.MajorUnit = 10
'Set the offset value
categoryAxis.Offset = 450
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation
presentation__1.Close()
NoMultiLevelLabel
True if multi-Level category axis is not allowed. otherwise False.
Declaration
bool NoMultiLevelLabel { get; set; }
Property Value
Type |
---|
System.Boolean |
NumberOfBins
Gets / Sets the Number of Bins in the axis
Declaration
int NumberOfBins { get; set; }
Property Value
Type |
---|
System.Int32 |
Remarks
Applies only to Histogram and Pareto charts.Can be a value from 1 through 31999.
Offset
Gets or sets the distance between the labels and axis line. The value can be from 0 through 1000.
Declaration
int Offset { get; set; }
Property Value
Type |
---|
System.Int32 |
OverflowBinValue
Get or Set the OverFlow Bin value
Declaration
double OverflowBinValue { get; set; }
Property Value
Type |
---|
System.Double |
Remarks
Applies only to Histogram and Pareto charts.
TickLabelSpacing
Gets or sets the number of categories or series between tick-mark labels.
Declaration
int TickLabelSpacing { get; set; }
Property Value
Type |
---|
System.Int32 |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "9/21/2015");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "9/24/2015");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "9/28/2015");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Create a new chart series with the name
IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
//Set the data range of chart serie � start row, start column, end row, end column
serieFeb.Values = chart.ChartData[2, 3, 4, 3];
//Create a new chart series with the name
IOfficeChartSerie serieMarch = chart.Series.Add("March");
//Set the data range of chart series � start row, start column, end row, end column
serieMarch.Values = chart.ChartData[2, 4, 4, 4];
//Get the primary category axis of chart
IOfficeChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis;
//Set the category labels
categoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
//Set the number format of axis
categoryAxis.NumberFormat = "m/d/yyyy";
//Set the tick label spacing
categoryAxis.TickLabelSpacing = 2;
//Set the tick mark spacing
categoryAxis.TickMarkSpacing = 2;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
'Create a presentation instance
Dim presentation__1 As IPresentation = Presentation.Create()
'Add a blank slide to the presentation
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Add chart to the slide with position and size
Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
'Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan")
chart.ChartData.SetValue(1, 3, "Feb")
chart.ChartData.SetValue(1, 4, "March")
'Set chart data - Row2
chart.ChartData.SetValue(2, 1, "9/21/2015")
chart.ChartData.SetValue(2, 2, "60")
chart.ChartData.SetValue(2, 3, "70")
chart.ChartData.SetValue(2, 4, "80")
'Set chart data - Row3
chart.ChartData.SetValue(3, 1, "9/24/2015")
chart.ChartData.SetValue(3, 2, "80")
chart.ChartData.SetValue(3, 3, "70")
chart.ChartData.SetValue(3, 4, "60")
'Set chart data - Row4
chart.ChartData.SetValue(4, 1, "9/28/2015")
chart.ChartData.SetValue(4, 2, "60")
chart.ChartData.SetValue(4, 3, "70")
chart.ChartData.SetValue(4, 4, "80")
'Create a new chart series with the name
Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
'Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData(2, 2, 4, 2)
'Create a new chart series with the name
Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
'Set the data range of chart serie � start row, start column, end row, end column
serieFeb.Values = chart.ChartData(2, 3, 4, 3)
'Create a new chart series with the name
Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
'Set the data range of chart series � start row, start column, end row, end column
serieMarch.Values = chart.ChartData(2, 4, 4, 4)
'Get the primary category axis of chart
Dim categoryAxis As IOfficeChartCategoryAxis = chart.PrimaryCategoryAxis
'Set the category labels
categoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
'Set the number format of axis
categoryAxis.NumberFormat = "m/d/yyyy"
'Set the tick label spacing
categoryAxis.TickLabelSpacing = 2
'Set the tick mark spacing
categoryAxis.TickMarkSpacing = 2
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation
presentation__1.Close()
TickMarkSpacing
Gets or sets the number of categories or series between tick marks.
Declaration
int TickMarkSpacing { get; set; }
Property Value
Type |
---|
System.Int32 |
Examples
//Create a presentation instance
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Add chart to the slide with position and size
IPresentationChart chart = slide.Charts.AddChart(100, 10, 500, 300);
//Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan");
chart.ChartData.SetValue(1, 3, "Feb");
chart.ChartData.SetValue(1, 4, "March");
//Set chart data - Row2
chart.ChartData.SetValue(2, 1, "9/21/2015");
chart.ChartData.SetValue(2, 2, "60");
chart.ChartData.SetValue(2, 3, "70");
chart.ChartData.SetValue(2, 4, "80");
//Set chart data - Row3
chart.ChartData.SetValue(3, 1, "9/24/2015");
chart.ChartData.SetValue(3, 2, "80");
chart.ChartData.SetValue(3, 3, "70");
chart.ChartData.SetValue(3, 4, "60");
//Set chart data - Row4
chart.ChartData.SetValue(4, 1, "9/28/2015");
chart.ChartData.SetValue(4, 2, "60");
chart.ChartData.SetValue(4, 3, "70");
chart.ChartData.SetValue(4, 4, "80");
//Create a new chart series with the name
IOfficeChartSerie serieJan = chart.Series.Add("Jan");
//Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData[2, 2, 4, 2];
//Create a new chart series with the name
IOfficeChartSerie serieFeb = chart.Series.Add("Feb");
//Set the data range of chart serie � start row, start column, end row, end column
serieFeb.Values = chart.ChartData[2, 3, 4, 3];
//Create a new chart series with the name
IOfficeChartSerie serieMarch = chart.Series.Add("March");
//Set the data range of chart series � start row, start column, end row, end column
serieMarch.Values = chart.ChartData[2, 4, 4, 4];
//Get the primary category axis of chart
IOfficeChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis;
//Set the category labels
categoryAxis.CategoryLabels = chart.ChartData[2, 1, 4, 1];
//Set the number format of axis
categoryAxis.NumberFormat = "m/d/yyyy";
//Set the tick label spacing
categoryAxis.TickLabelSpacing = 2;
//Set the tick mark spacing
categoryAxis.TickMarkSpacing = 2;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
'Create a presentation instance
Dim presentation__1 As IPresentation = Presentation.Create()
'Add a blank slide to the presentation
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
'Add chart to the slide with position and size
Dim chart As IPresentationChart = slide.Charts.AddChart(100, 10, 500, 300)
'Set chart data - Row1
chart.ChartData.SetValue(1, 2, "Jan")
chart.ChartData.SetValue(1, 3, "Feb")
chart.ChartData.SetValue(1, 4, "March")
'Set chart data - Row2
chart.ChartData.SetValue(2, 1, "9/21/2015")
chart.ChartData.SetValue(2, 2, "60")
chart.ChartData.SetValue(2, 3, "70")
chart.ChartData.SetValue(2, 4, "80")
'Set chart data - Row3
chart.ChartData.SetValue(3, 1, "9/24/2015")
chart.ChartData.SetValue(3, 2, "80")
chart.ChartData.SetValue(3, 3, "70")
chart.ChartData.SetValue(3, 4, "60")
'Set chart data - Row4
chart.ChartData.SetValue(4, 1, "9/28/2015")
chart.ChartData.SetValue(4, 2, "60")
chart.ChartData.SetValue(4, 3, "70")
chart.ChartData.SetValue(4, 4, "80")
'Create a new chart series with the name
Dim serieJan As IOfficeChartSerie = chart.Series.Add("Jan")
'Set the data range of chart serie � start row, start column, end row, end column
serieJan.Values = chart.ChartData(2, 2, 4, 2)
'Create a new chart series with the name
Dim serieFeb As IOfficeChartSerie = chart.Series.Add("Feb")
'Set the data range of chart serie � start row, start column, end row, end column
serieFeb.Values = chart.ChartData(2, 3, 4, 3)
'Create a new chart series with the name
Dim serieMarch As IOfficeChartSerie = chart.Series.Add("March")
'Set the data range of chart series � start row, start column, end row, end column
serieMarch.Values = chart.ChartData(2, 4, 4, 4)
'Get the primary category axis of chart
Dim categoryAxis As IOfficeChartCategoryAxis = chart.PrimaryCategoryAxis
'Set the category labels
categoryAxis.CategoryLabels = chart.ChartData(2, 1, 4, 1)
'Set the number format of axis
categoryAxis.NumberFormat = "m/d/yyyy"
'Set the tick label spacing
categoryAxis.TickLabelSpacing = 2
'Set the tick mark spacing
categoryAxis.TickMarkSpacing = 2
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation
presentation__1.Close()
UnderflowBinValue
Get or Set the UnderFlow Bin value
Declaration
double UnderflowBinValue { get; set; }
Property Value
Type |
---|
System.Double |
Remarks
Applies only to Histogram and Pareto charts.