Interface IOfficeChartAxis
Represents an axis in a chart.
Namespace: Syncfusion.OfficeChart
Assembly: Syncfusion.OfficeChart.Base.dll
Syntax
public interface IOfficeChartAxis
Properties
AutoTickLabelSpacing
Gets or sets a value that indicates the tick label position is automatic or not
Declaration
bool AutoTickLabelSpacing { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Examples
IPresentation presentation = Presentation.Open("Template.pptx");
ISlide slide = presentation.Slides[0];
//Get the chart from slide
IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
//Create an instance of chart axis
IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
//Set auto tick label spacing
chartAxis.AutoTickLabelSpacing = true;
//Set the border of chart axis
chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium;
//Set 3D options for chart
chartAxis.Chart3DOptions.BevelBottomWidth = 200;
//Set the font color for chart axis
chartAxis.Font.Color = OfficeKnownColors.Lavender;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
Dim presentation As IPresentation = Presentation.Open("Template.pptx")
Dim slide As ISlide = presentation.Slides(0)
'Get the chart from slide
Dim chart As IPresentationChart= TryCast(slide.Shapes(0), IPresentationChart)
'Create an instance of chart axis
Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
'Set auto tick label spacing
chartAxis.AutoTickLabelSpacing = True
'Set the border of chart axis
chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium
'Set 3D options for chart
chartAxis.Chart3DOptions.BevelBottomWidth = 200
'Set the font color for chart axis
chartAxis.Font.Color = OfficeKnownColors.Lavender
'Save the presentation
presentation.Save("Output.pptx")
'Close the presentation
presentation.Close()
AxisType
Gets the axis type. Read-only.
Declaration
OfficeAxisType AxisType { get; }
Property Value
Type | Description |
---|---|
OfficeAxisType |
Examples
IPresentation presentation = Presentation.Open("Template.pptx");
ISlide slide = presentation.Slides[0];
//Get the chart from slide
IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
//Create an instance of chart axis
IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
//Get the chart axis type, read only
OfficeAxisType axisType = chartAxis.AxisType;
//Enable reverse plot order
chartAxis.ReversePlotOrder = true;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
Dim presentation As IPresentation = Presentation.Open("Template.pptx")
Dim slide As ISlide = presentation.Slides(0)
'Get the chart from slide
Dim chart As IPresentationChart= TryCast(slide.Shapes(0), IPresentationChart)
'Create an instance of chart axis
Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
'Get the chart axis type, read only
Dim axisType As OfficeAxisType = chartAxis.AxisType
'Enable reverse plot order
chartAxis.ReversePlotOrder = True
'Save the presentation
presentation.Save("Output.pptx")
'Close the presentation
presentation.Close()
Border
Gets border of the axis. Read-only.
Declaration
IOfficeChartBorder Border { get; }
Property Value
Type | Description |
---|---|
IOfficeChartBorder |
Examples
IPresentation presentation = Presentation.Open("Template.pptx");
ISlide slide = presentation.Slides[0];
//Get the chart from slide
IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
//Create an instance of chart axis
IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
//Set auto tick label spacing
chartAxis.AutoTickLabelSpacing = true;
//Set the border of chart axis
chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium;
//Set 3D options for chart
chartAxis.Chart3DOptions.BevelBottomWidth = 200;
//Set the font color for chart axis
chartAxis.Font.Color = OfficeKnownColors.Lavender;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
Dim presentation As IPresentation = Presentation.Open("Template.pptx")
Dim slide As ISlide = presentation.Slides(0)
'Get the chart from slide
Dim chart As IPresentationChart= TryCast(slide.Shapes(0), IPresentationChart)
'Create an instance of chart axis
Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
'Set auto tick label spacing
chartAxis.AutoTickLabelSpacing = True
'Set the border of chart axis
chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium
'Set 3D options for chart
chartAxis.Chart3DOptions.BevelBottomWidth = 200
'Set the font color for chart axis
chartAxis.Font.Color = OfficeKnownColors.Lavender
'Save the presentation
presentation.Save("Output.pptx")
'Close the presentation
presentation.Close()
Chart3DOptions
Gets the 3-D�effect formatting properties for the specified chart. Read-only
Declaration
IThreeDFormat Chart3DOptions { get; }
Property Value
Type | Description |
---|---|
IThreeDFormat | The three_ D. |
Examples
IPresentation presentation = Presentation.Open("Template.pptx");
ISlide slide = presentation.Slides[0];
//Get the chart from slide
IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
//Create an instance of chart axis
IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
//Set the border of chart axis
chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium;
//Set 3D options for chart
chartAxis.Chart3DOptions.BevelBottomWidth = 200;
//Set the font color for chart axis
chartAxis.Font.Color = OfficeKnownColors.Lavender;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
Dim presentation As IPresentation = Presentation.Open("Template.pptx")
Dim slide As ISlide = presentation.Slides(0)
'Get the chart from slide
Dim chart As IPresentationChart= TryCast(slide.Shapes(0), IPresentationChart)
'Create an instance of chart axis
Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
'Set auto tick label spacing
chartAxis.AutoTickLabelSpacing = True
'Set the border of chart axis
chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium
'Set 3D options for chart
chartAxis.Chart3DOptions.BevelBottomWidth = 200
'Set the font color for chart axis
chartAxis.Font.Color = OfficeKnownColors.Lavender
'Save the presentation
presentation.Save("Output.pptx")
'Close the presentation
presentation.Close()
Font
Gets a Font object that represents character formatting. Read-only.
Declaration
IOfficeFont Font { get; }
Property Value
Type | Description |
---|---|
IOfficeFont |
Examples
IPresentation presentation = Presentation.Open("Template.pptx");
ISlide slide = presentation.Slides[0];
//Get the chart from slide
IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
//Create an instance of chart axis
IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
//Set auto tick label spacing
chartAxis.AutoTickLabelSpacing = true;
//Set the border of chart axis
chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium;
//Set 3D options for chart
chartAxis.Chart3DOptions.BevelBottomWidth = 200;
//Set the font color for chart axis
chartAxis.Font.Color = OfficeKnownColors.Lavender;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
Dim presentation As IPresentation = Presentation.Open("Template.pptx")
Dim slide As ISlide = presentation.Slides(0)
'Get the chart from slide
Dim chart As IPresentationChart= TryCast(slide.Shapes(0), IPresentationChart)
'Create an instance of chart axis
Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
'Set auto tick label spacing
chartAxis.AutoTickLabelSpacing = True
'Set the border of chart axis
chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium
'Set 3D options for chart
chartAxis.Chart3DOptions.BevelBottomWidth = 200
'Set the font color for chart axis
chartAxis.Font.Color = OfficeKnownColors.Lavender
'Save the presentation
presentation.Save("Output.pptx")
'Close the presentation
presentation.Close()
HasMajorGridLines
Gets or sets a value that indicates the axis has major gridlines.
Declaration
bool HasMajorGridLines { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Examples
IPresentation presentation = Presentation.Open("Template.pptx");
ISlide slide = presentation.Slides[0];
//Get the chart from slide
IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
//Create an instance of chart axis
IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
//Set minor gridline
chartAxis.HasMinorGridLines = true;
//Set the font color for chart axis
chartAxis.Font.Color = OfficeKnownColors.Lavender;
//Set the major gridlines
chartAxis.HasMajorGridLines = true;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
Dim slide As ISlide = presentation__1.Slides(0)
'Get the chart from slide
Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
'Create an instance of chart axis
Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
'Set minor gridline
chartAxis.HasMinorGridLines = True
'Set the font color for chart axis
chartAxis.Font.Color = OfficeKnownColors.Lavender
'Set the major gridlines
chartAxis.HasMajorGridLines = True
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation
presentation__1.Close()
HasMinorGridLines
Gets or sets a value that indicates the axis has minor gridlines.
Declaration
bool HasMinorGridLines { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Examples
IPresentation presentation = Presentation.Open("Template.pptx");
ISlide slide = presentation.Slides[0];
//Get the chart from slide
IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
//Create an instance of chart axis
IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
//Set 3D options for chart
chartAxis.Chart3DOptions.BevelBottomWidth = 200;
//Set the font color for chart axis
chartAxis.Font.Color = OfficeKnownColors.Lavender;
//Set the minor grid lines
chartAxis.HasMinorGridLines = true;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
Dim slide As ISlide = presentation__1.Slides(0)
'Get the chart from slide
Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
'Create an instance of chart axis
Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
'Set 3D options for chart
chartAxis.Chart3DOptions.BevelBottomWidth = 200
'Set the font color for chart axis
chartAxis.Font.Color = OfficeKnownColors.Lavender
'Set the minor grid lines
chartAxis.HasMinorGridLines = True
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation
presentation__1.Close()
MajorGridLines
Gets the major gridlines for the axis. Read-only
Declaration
IOfficeChartGridLine MajorGridLines { get; }
Property Value
Type | Description |
---|---|
IOfficeChartGridLine |
Examples
IPresentation presentation = Presentation.Open("Template.pptx");
ISlide slide = presentation.Slides[0];
//Get the chart from slide
IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
//Create an instance of chart axis
IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
//Set major gridline
chartAxis.HasMajorGridLines = true;
//Get the major gridline of chart axis, read only
IOfficeChartGridLine gridline = chartAxis.MajorGridLines;
//Set border of major grid line
gridline.Border.AutoFormat = true;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
Dim slide As ISlide = presentation__1.Slides(0)
'Get the chart from slide
Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
'Create an instance of chart axis
Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
'Set major gridline
chartAxis.HasMajorGridLines = True
'Get the major gridline of chart axis, read only
Dim gridline As IOfficeChartGridLine = chartAxis.MajorGridLines
'Set border of major grid line
gridline.Border.AutoFormat = True
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation
presentation__1.Close()
MajorTickMark
Gets or sets the type of major tick mark for the axis.
Declaration
OfficeTickMark MajorTickMark { get; set; }
Property Value
Type | Description |
---|---|
OfficeTickMark |
Examples
IPresentation presentation = Presentation.Open("Template.pptx");
ISlide slide = presentation.Slides[0];
//Get the chart from slide
IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
//Create an instance of chart axis
IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
//Set the border of chart axis
chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium;
//Set 3D options for chart
chartAxis.Chart3DOptions.BevelBottomWidth = 200;
//Set the font color for chart axis
chartAxis.Font.Color = OfficeKnownColors.Lavender;
//Set the major tick mark
chartAxis.MajorTickMark = OfficeTickMark.TickMark_Inside;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
Dim slide As ISlide = presentation__1.Slides(0)
'Get the chart from slide
Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
'Create an instance of chart axis
Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
'Set the border of chart axis
chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium
'Set 3D options for chart
chartAxis.Chart3DOptions.BevelBottomWidth = 200
'Set the font color for chart axis
chartAxis.Font.Color = OfficeKnownColors.Lavender
'Set the major tick mark
chartAxis.MajorTickMark = OfficeTickMark.TickMark_Inside
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation
presentation__1.Close()
MinorGridLines
Gets the minor gridlines for the axis. Read-only
Declaration
IOfficeChartGridLine MinorGridLines { get; }
Property Value
Type | Description |
---|---|
IOfficeChartGridLine |
Examples
IPresentation presentation = Presentation.Open("Template.pptx");
ISlide slide = presentation.Slides[0];
//Get the chart from slide
IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
//Create an instance of chart axis
IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
//Set minor gridline
chartAxis.HasMinorGridLines = true;
//Get the minor gridline of chart axis, read only
IOfficeChartGridLine gridline = chartAxis.MinorGridLines;
//Set border of minor grid line
gridline.Border.AutoFormat = true;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
Dim slide As ISlide = presentation__1.Slides(0)
'Get the chart from slide
Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
'Create an instance of chart axis
Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
'Set minor gridline
chartAxis.HasMinorGridLines = True
'Get the minor gridline of chart axis, read only
Dim gridline As IOfficeChartGridLine = chartAxis.MinorGridLines
'Set border of minor grid line
gridline.Border.AutoFormat = True
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation
presentation__1.Close()
MinorTickMark
Gets or sets the type of minor tick mark for the axis.
Declaration
OfficeTickMark MinorTickMark { get; set; }
Property Value
Type | Description |
---|---|
OfficeTickMark |
Examples
IPresentation presentation = Presentation.Open("Template.pptx");
ISlide slide = presentation.Slides[0];
//Get the chart from slide
IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
//Create an instance of chart axis
IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
//Set the border of chart axis
chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium;
//Set 3D options for chart
chartAxis.Chart3DOptions.BevelBottomWidth = 200;
//Set the font color for chart axis
chartAxis.Font.Color = OfficeKnownColors.Lavender;
//Set the minor tick mark
chartAxis.MinorTickMark = OfficeTickMark.TickMark_Outside;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
Dim slide As ISlide = presentation__1.Slides(0)
'Get the chart from slide
Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
'Create an instance of chart axis
Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
'Set the border of chart axis
chartAxis.Border.LineWeight = OfficeChartLineWeight.Medium
'Set 3D options for chart
chartAxis.Chart3DOptions.BevelBottomWidth = 200
'Set the font color for chart axis
chartAxis.Font.Color = OfficeKnownColors.Lavender
'Set the minor tick mark
chartAxis.MinorTickMark = OfficeTickMark.TickMark_Outside
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation
presentation__1.Close()
NumberFormat
Gets or sets the format code for the axis values.
Declaration
string NumberFormat { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Examples
IPresentation presentation = Presentation.Open("Template.pptx");
ISlide slide = presentation.Slides[0];
//Get the chart from slide
IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
//Create an instance of chart axis
//Set the number format of axis
chartAxis.NumberFormat = "Number";
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
Dim presentation As IPresentation = Presentation.Open("Template.pptx")
Dim slide As ISlide = presentation.Slides(0)
'Get the chart from slide
Dim chart As IPresentationChart= TryCast(slide.Shapes(0), IPresentationChart)
'Create an instance of chart axis
'Set the number format of axis
chartAxis.NumberFormat = "Number"
'Save the presentation
presentation.Save("Output.pptx")
'Close the presentation
presentation.Close()
ReversePlotOrder
Gets or sets How to plots data points in the axis.True if plots data points from last to first.
Declaration
bool ReversePlotOrder { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Examples
IPresentation presentation = Presentation.Open("Template.pptx");
ISlide slide = presentation.Slides[0];
//Get the chart from slide
IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
//Create an instance of chart axis
IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
//Get the chart axis type, read only
OfficeAxisType axisType = chartAxis.AxisType;
//Enable reverse plot order
chartAxis.ReversePlotOrder = true;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
Dim presentation As IPresentation = Presentation.Open("Template.pptx")
Dim slide As ISlide = presentation.Slides(0)
'Get the chart from slide
Dim chart As IPresentationChart= TryCast(slide.Shapes(0), IPresentationChart)
'Create an instance of chart axis
Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
'Get the chart axis type, read only
Dim axisType As OfficeAxisType = chartAxis.AxisType
'Enable reverse plot order
chartAxis.ReversePlotOrder = True
'Save the presentation
presentation.Save("Output.pptx")
'Close the presentation
presentation.Close()
Shadow
Gets shadow formatting properties for the chart element. Read-only
Declaration
IShadow Shadow { get; }
Property Value
Type | Description |
---|---|
IShadow |
Examples
IPresentation presentation = Presentation.Open("Template.pptx");
ISlide slide = presentation.Slides[0];
//Get the chart from slide
IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
//Create an instance of chart axis
IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
//Get the shadow od axis
IShadow shadow = chartAxis.Shadow;
//Set the shadow color
shadow.ShadowColor = Color.Brown;
//Set the shadow angle
shadow.Angle = 87;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
Dim slide As ISlide = presentation__1.Slides(0)
'Get the chart from slide
Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
'Create an instance of chart axis
Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
'Get the shadow od axis
Dim shadow As IShadow = chartAxis.Shadow
'Set the shadow color
shadow.ShadowColor = Color.Brown
'Set the shadow angle
shadow.Angle = 87
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation
presentation__1.Close()
TextRotationAngle
Gets or sets the text rotation angle. Should be integer value between -90 and 90.
Declaration
int TextRotationAngle { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Examples
IPresentation presentation = Presentation.Open("Template.pptx");
ISlide slide = presentation.Slides[0];
//Get the chart from slide
IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
//Create an instance of chart axis
IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
chartAxis.ReversePlotOrder = true;
//Set the text rotation angle
chartAxis.TextRotationAngle = 50;
//Set the title
chartAxis.Title = "Chart Axis";
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
Dim presentation As IPresentation = Presentation.Open("Template.pptx")
Dim slide As ISlide = presentation.Slides(0)
'Get the chart from slide
Dim chart As IPresentationChart= TryCast(slide.Shapes(0), IPresentationChart)
'Create an instance of chart axis
Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
chartAxis.ReversePlotOrder = True
'Set the text rotation angle
chartAxis.TextRotationAngle = 30
'Set the title
chartAxis.Title = "Chart Axis"
'Set the font style for title area
chartAxis.TitleArea.Bold = True
'Save the presentation
presentation.Save("Output.pptx")
'Close the presentation
presentation.Close()
TickLabelPosition
Gets or sets the position of tick-mark labels on the axis.
Declaration
OfficeTickLabelPosition TickLabelPosition { get; set; }
Property Value
Type | Description |
---|---|
OfficeTickLabelPosition |
Examples
IPresentation presentation = Presentation.Open("Template.pptx");
ISlide slide = presentation.Slides[0];
//Get the chart from slide
IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
//Create an instance of chart axis
IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
//Set the tick label position
chartAxis.TickLabelPosition = OfficeTickLabelPosition.TickLabelPosition_NextToAxis;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
Dim slide As ISlide = presentation__1.Slides(0)
'Get the chart from slide
Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
'Create an instance of chart axis
Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
'Set the tick label position
chartAxis.TickLabelPosition = OfficeTickLabelPosition.TickLabelPosition_NextToAxis
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation
presentation__1.Close()
Title
Gets or sets the axis title.
Declaration
string Title { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Examples
IPresentation presentation = Presentation.Open("Template.pptx");
ISlide slide = presentation.Slides[0];
//Get the chart from slide
IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
//Create an instance of chart axis
IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
chartAxis.ReversePlotOrder = true;
//Set the text rotation angle
chartAxis.TextRotationAngle = 30;
//Set the title
chartAxis.Title = "Chart Axis";
//Set the font style for title area
chartAxis.TitleArea.Bold = true;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
Dim presentation As IPresentation = Presentation.Open("Template.pptx")
Dim slide As ISlide = presentation.Slides(0)
'Get the chart from slide
Dim chart As IPresentationChart= TryCast(slide.Shapes(0), IPresentationChart)
'Create an instance of chart axis
Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
chartAxis.ReversePlotOrder = True
'Set the text rotation angle
chartAxis.TextRotationAngle = 30
'Set the title
chartAxis.Title = "Chart Axis"
'Set the font style for title area
chartAxis.TitleArea.Bold = True
'Save the presentation
presentation.Save("Output.pptx")
'Close the presentation
presentation.Close()
TitleArea
Gets text area for the axis title. Read-only.
Declaration
IOfficeChartTextArea TitleArea { get; }
Property Value
Type | Description |
---|---|
IOfficeChartTextArea |
Examples
IPresentation presentation = Presentation.Open("Template.pptx");
ISlide slide = presentation.Slides[0];
//Get the chart from slide
IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
//Create an instance of chart axis
IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
chartAxis.ReversePlotOrder = true;
//Set the text rotation angle
chartAxis.TextRotationAngle = 30;
//Set the title
chartAxis.Title = "Chart Axis";
//Set the font style for title area
chartAxis.TitleArea.Bold = true;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
Dim presentation As IPresentation = Presentation.Open("Template.pptx")
Dim slide As ISlide = presentation.Slides(0)
'Get the chart from slide
Dim chart As IPresentationChart= TryCast(slide.Shapes(0), IPresentationChart)
'Create an instance of chart axis
Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
chartAxis.ReversePlotOrder = True
'Set the text rotation angle
chartAxis.TextRotationAngle = 30
'Set the title
chartAxis.Title = "Chart Axis"
'Set the font style for title area
chartAxis.TitleArea.Bold = True
'Save the presentation
presentation.Save("Output.pptx")
'Close the presentation
presentation.Close()
Visible
Gets or sets a value that indicates axis is visible or not.
Declaration
bool Visible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Examples
IPresentation presentation = Presentation.Open("Template.pptx");
ISlide slide = presentation.Slides[0];
//Get the chart from slide
IPresentationChart chart = slide.Shapes[0] as IPresentationChart;
//Create an instance of chart axis
IOfficeChartAxis chartAxis = chart.PrimaryValueAxis;
//Hide the visibility of chart axis
chartAxis.Visible = false;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation
presentation.Close();
Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
Dim slide As ISlide = presentation__1.Slides(0)
'Get the chart from slide
Dim chart As IPresentationChart = TryCast(slide.Shapes(0), IPresentationChart)
'Create an instance of chart axis
Dim chartAxis As IOfficeChartAxis = chart.PrimaryValueAxis
'Hide the visibility of chart axis
chartAxis.Visible = False
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation
presentation__1.Close()