Get Started
Documentation

ApiChart

new ApiChart()

Class representing a Chart.

Methods

Name Description
GetClassType

Get the type of this class.

SetHorAxisLablesFontSize

Specifies font size for labels of horizontal axis

SetHorAxisMajorTickMark

Specifies major tick mark for horizontal axis

SetHorAxisMinorTickMark

Specifies minor tick mark for horizontal axis

SetHorAxisOrientation

Specifies a horizontal axis orientation

SetHorAxisTickLabelPosition

Spicifies tick labels position horizontal axis

SetHorAxisTitle

Specify the chart horizontal axis title.

SetLegendFontSize

Specifies a legend position

SetLegendPos

Specify the chart legend position.

SetMajorHorizontalGridlines

Specifies major horizontal gridline's visual properties

SetMajorVerticalGridlines

Specifies major vertical gridline's visual properties

SetMinorHorizontalGridlines

Specifies minor vertical gridline's visual properties

SetMinorVerticalGridlines

Specifies minor vertical gridline's visual properties

SetShowDataLabels

Specifies which chart data labels are shown for the chart.

SetShowPointDataLabel

Spicifies a show options for data labels

SetTitle

Specify the chart title.

SetVerAxisOrientation

Specifies a vertical axis orientation

SetVerAxisTitle

Specify the chart vertical axis title.

SetVertAxisLablesFontSize

Specifies font size for labels of vertical axis

SetVertAxisMajorTickMark

Specifies major tick mark for vertical axis

SetVertAxisMinorTickMark

Specifies minor tick mark for vertical axis

SetVertAxisTickLabelPosition

Spicifies tick labels position vertical axis

Example

Copy code
builder.CreateFile("docx");
var oDocument = Api.GetDocument();
var oParagraph, oDrawing;
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