Get Started
Documentation

GetNextChart

GetNextChart() → { ApiChart | null }

Gets the next inline chart.

Returns:

Type
ApiChart | null

Example

Copy code
builder.CreateFile("docx");
oDocument = Api.GetDocument();
oParagraph = oDocument.GetElement(0);
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);
oParagraph.AddDrawing(oChart);
oCopyChart = oChart.Copy();
oParagraph.AddDrawing(oCopyChart);
oNextChart = oChart.GetNextChart();
oStroke = Api.CreateStroke(1 * 150, Api.CreateSolidFill(Api.CreateRGBColor(155, 64, 1)));
oNextChart.SetMinorHorizontalGridlines(oStroke);
builder.SaveFile("docx", "GetNextChart.docx");
builder.CloseFile();

Resulting document