Get Started
Usage API
More information

ApiChart

new ApiChart()

Class representing a chart.

Methods

Name Description
GetClassType

Get the type of this class.

SetHorAxisLablesFontSize

Specify font size for labels of horizontal axis.

SetHorAxisMajorTickMark

Specify major tick mark for horizontal axis.

SetHorAxisMinorTickMark

Specify minor tick mark for horizontal axis.

SetHorAxisOrientation

Specify a horizontal axis orientation.

SetHorAxisTickLabelPosition

Spicify tick labels position for horizontal axis.

SetHorAxisTitle

Specify the chart horizontal axis title.

SetLegendFontSize

Specify a legend font size.

SetLegendPos

Specify the chart legend position.

SetMajorHorizontalGridlines

Specify major horizontal gridline's visual properties.

SetMajorVerticalGridlines

Specify major vertical gridline's visual properties.

SetMinorHorizontalGridlines

Specify minor vertical gridline's visual properties.

SetMinorVerticalGridlines

Specify minor vertical gridline's visual properties.

SetShowDataLabels

Specify which chart data labels are shown for the chart.

SetShowPointDataLabel

Spicify the show options for data labels.

SetTitle

Specify the chart title.

SetVerAxisOrientation

Specify a vertical axis orientation.

SetVerAxisTitle

Specify the chart vertical axis title.

SetVertAxisLablesFontSize

Specify font size for labels of vertical axis.

SetVertAxisMajorTickMark

Specify major tick mark for vertical axis.

SetVertAxisMinorTickMark

Specify minor tick mark for vertical axis.

SetVertAxisTickLabelPosition

Spicify tick labels position for vertical axis.

Example

Copy code
builder.CreateFile("pptx");
oPresentation = Api.GetPresentation();
oSlide = oPresentation.GetSlideByIndex(0);
oSlide.RemoveAllObjects();
oChart = Api.CreateChart("bar3D", [
  [200, 240, 280],
  [250, 260, 280]
], ["Projected Revenue", "Estimated Costs"], [2014, 2015, 2016], 4051300, 2347595, 24);
oChart.SetVerAxisTitle("USD In Hundred Thousands", 10);
oChart.SetHorAxisTitle("Year", 11);
oChart.SetLegendPos("bottom");
oChart.SetShowDataLabels(false, false, true, false);
oChart.SetTitle("Financial Overview", 13);
oChart.SetSize(300 * 36000, 130 * 36000);
oChart.SetPosition(608400, 1267200);
oSlide.AddObject(oChart);
builder.SaveFile("pptx", "ApiChart.pptx");
builder.CloseFile();

Resulting document