Get Started
Usage API
More information

ApiChart

new ApiChart()

Class representing a chart.

Methods

Name Description
GetClassType

Returns a type of the ApiChart class.

GetNextChart

Returns the next inline chart if exists.

GetPrevChart

Returns the previous inline chart if exists.

SetHorAxisLablesFontSize

Specifies font size for labels of the horizontal axis.

SetHorAxisMajorTickMark

Specifies major tick mark for the horizontal axis.

SetHorAxisMinorTickMark

Specifies minor tick mark for the horizontal axis.

SetHorAxisOrientation

Specifies the horizontal axis orientation.

SetHorAxisTickLabelPosition

Spicifies tick labels position for the horizontal axis.

SetHorAxisTitle

Specifies the chart horizontal axis title.

SetLegendFontSize

Specifies the legend font size.

SetLegendPos

Specifies the chart legend position.

SetMajorHorizontalGridlines

Specifies major horizontal gridline visual properties.

SetMajorVerticalGridlines

Specifies major vertical gridline visual properties.

SetMinorHorizontalGridlines

Specifies minor horizontal gridline visual properties.

SetMinorVerticalGridlines

Specifies minor vertical gridline visual properties.

SetShowDataLabels

Specifies which chart data labels are shown for the chart.

SetShowPointDataLabel

Spicifies the show options for 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 labels of the vertical axis.

SetVertAxisMajorTickMark

Specifies major tick mark for the vertical axis.

SetVertAxisMinorTickMark

Specifies minor tick mark for the vertical axis.

SetVertAxisTickLabelPosition

Spicifies tick labels position for the vertical axis.

Example

Copy code
builder.CreateFile("docx");
oDocument = Api.GetDocument();
oParagraph = oDocument.GetElement(0);
oDrawing = Api.CreateChart("bar3D", [
  [200, 240, 280],
  [250, 260, 280]
], ["Projected Revenue", "Estimated Costs"], [2014, 2015, 2016], 4051300, 2347595, 24);
oDrawing.SetVerAxisTitle("USD In Hundred Thousands", 10);
oDrawing.SetHorAxisTitle("Year", 11);
oDrawing.SetLegendPos("bottom");
oDrawing.SetShowDataLabels(false, false, true, false);
oDrawing.SetTitle("Financial Overview", 13);
oParagraph.AddDrawing(oDrawing);
builder.SaveFile("docx", "ApiChart.docx");
builder.CloseFile();

Resulting document