Get Started
Usage API
More information

ApiChart

new ApiChart()

Class representing a chart.

Methods

Name Description
GetClassType

Returns the type of the ApiChart class.

SetHorAxisLablesFontSize

Specifies font size for the labels of the horizontal axis.

SetHorAxisMajorTickMark

Specifies the major tick mark for the horizontal axis.

SetHorAxisMinorTickMark

Specifies the minor tick mark for the horizontal axis.

SetHorAxisOrientation

Specifies the horizontal axis orientation.

SetHorAxisTickLabelPosition

Spicifies tick label position for the horizontal axis.

SetHorAxisTitle

Specifies the chart horizontal axis title.

SetLegendFontSize

Specifies the chart legend font size.

SetLegendPos

Specifies the chart legend position.

SetMajorHorizontalGridlines

Specifies the visual properties for the major horizontal gridlines.

SetMajorVerticalGridlines

Specifies the visual properties for the major vertical gridlines.

SetMinorHorizontalGridlines

Specifies the visual properties for the minor horizontal gridlines.

SetMinorVerticalGridlines

Specifies the visual properties for the minor vertical gridlines.

SetShowDataLabels

Specifies which chart data labels are shown for the chart.

SetShowPointDataLabel

Spicifies the show options for the chart data labels.

SetTitle

Specifies the chart title.

SetVerAxisOrientation

Specifies the vertical axis orientation.

SetVerAxisTitle

Specifies the chart vertical axis title.

SetVertAxisLablesFontSize

Specifies font size for the labels of the vertical axis.

SetVertAxisMajorTickMark

Specifies the major tick mark for the vertical axis.

SetVertAxisMinorTickMark

Specifies the minor tick mark for the vertical axis.

SetVertAxisTickLabelPosition

Spicifies tick label position for the vertical axis.

Example

Copy code
builder.CreateFile("pptx");
var oPresentation = Api.GetPresentation();
var oSlide = oPresentation.GetSlideByIndex(0);
oSlide.RemoveAllObjects();
var 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