ChartSeriesGroup

Inheritance: java.lang.Object

public class ChartSeriesGroup

Represents properties of a chart series group, that is, the properties of chart series of the same type associated with the same axes.

Remarks:

Combo charts contains multiple chart series groups, with a separate group for each series type.

Also, you can create a chart series group to assign secondary axes to one or more chart series.

To learn more, visit the Working with Charts documentation article.

Examples:

Shows how to work with the secondary axis of chart.


 Document doc = new Document();
 DocumentBuilder builder = new DocumentBuilder(doc);

 Shape shape = builder.insertChart(ChartType.LINE, 450.0, 250.0);
 Chart chart = shape.getChart();
 ChartSeriesCollection series = chart.getSeries();

 // Delete default generated series.
 series.clear();

 String[] categories = new String[] { "Category 1", "Category 2", "Category 3" };
 series.add("Series 1 of primary series group", categories, new double[] { 2.0, 3.0, 4.0 });
 series.add("Series 2 of primary series group", categories, new double[] { 5.0, 2.0, 3.0 });

 // Create an additional series group, also of the line type.
 ChartSeriesGroup newSeriesGroup = chart.getSeriesGroups().add(ChartSeriesType.LINE);
 // Specify the use of secondary axes for the new series group.
 newSeriesGroup.setAxisGroup(AxisGroup.SECONDARY);
 // Hide the secondary X axis.
 newSeriesGroup.getAxisX().setHidden(true);
 // Define title of the secondary Y axis.
 newSeriesGroup.getAxisY().getTitle().setShow(true);
 newSeriesGroup.getAxisY().getTitle().setText("Secondary Y axis");

 // Add a series to the new series group.
 ChartSeries series3 =
         newSeriesGroup.getSeries().add("Series of secondary series group", categories, new double[] { 13.0, 11.0, 16.0 });
 series3.getFormat().getStroke().setWeight(3.5);

 doc.save(getArtifactsDir() + "Charts.SecondaryAxis.docx");
 

Methods

MethodDescription
getAxisGroup()Gets the axis group to which this series group belongs.
getAxisX()Provides access to properties of the X axis of this series group.
getAxisY()Provides access to properties of the Y axis of this series group.
getBubbleScale()Gets the size of the bubbles as a percentage of their default size.
getDoughnutHoleSize()Gets the hole size of the parent doughnut chart as a percentage.
getFirstSliceAngle()Gets the angle, in degrees, of the first slice of the parent pie chart.
getGapWidth()Gets the percentage of gap width between chart elements.
getOverlap()Gets the percentage of how much the series bars or columns overlap.
getSecondSectionSize()Gets the size of the pie chart secondary section as a percentage.
getSeries()Gets a collection of series that belong to this series group.
getSeriesType()Gets the type of chart series included in this group.
setAxisGroup(int value)Sets the axis group to which this series group belongs.
setBubbleScale(int value)Sets the size of the bubbles as a percentage of their default size.
setDoughnutHoleSize(int value)Sets the hole size of the parent doughnut chart as a percentage.
setFirstSliceAngle(int value)Sets the angle, in degrees, of the first slice of the parent pie chart.
setGapWidth(int value)Sets the percentage of gap width between chart elements.
setOverlap(int value)Sets the percentage of how much the series bars or columns overlap.
setSecondSectionSize(int value)Sets the size of the pie chart secondary section as a percentage.

getAxisGroup()

public int getAxisGroup()

Gets the axis group to which this series group belongs.

Examples:

Shows how to work with the secondary axis of chart.


 Document doc = new Document();
 DocumentBuilder builder = new DocumentBuilder(doc);

 Shape shape = builder.insertChart(ChartType.LINE, 450.0, 250.0);
 Chart chart = shape.getChart();
 ChartSeriesCollection series = chart.getSeries();

 // Delete default generated series.
 series.clear();

 String[] categories = new String[] { "Category 1", "Category 2", "Category 3" };
 series.add("Series 1 of primary series group", categories, new double[] { 2.0, 3.0, 4.0 });
 series.add("Series 2 of primary series group", categories, new double[] { 5.0, 2.0, 3.0 });

 // Create an additional series group, also of the line type.
 ChartSeriesGroup newSeriesGroup = chart.getSeriesGroups().add(ChartSeriesType.LINE);
 // Specify the use of secondary axes for the new series group.
 newSeriesGroup.setAxisGroup(AxisGroup.SECONDARY);
 // Hide the secondary X axis.
 newSeriesGroup.getAxisX().setHidden(true);
 // Define title of the secondary Y axis.
 newSeriesGroup.getAxisY().getTitle().setShow(true);
 newSeriesGroup.getAxisY().getTitle().setText("Secondary Y axis");

 // Add a series to the new series group.
 ChartSeries series3 =
         newSeriesGroup.getSeries().add("Series of secondary series group", categories, new double[] { 13.0, 11.0, 16.0 });
 series3.getFormat().getStroke().setWeight(3.5);

 doc.save(getArtifactsDir() + "Charts.SecondaryAxis.docx");
 

Returns: int - The axis group to which this series group belongs. The returned value is one of AxisGroup constants.

getAxisX()

public ChartAxis getAxisX()

Provides access to properties of the X axis of this series group.

Examples:

Shows how to work with the secondary axis of chart.


 Document doc = new Document();
 DocumentBuilder builder = new DocumentBuilder(doc);

 Shape shape = builder.insertChart(ChartType.LINE, 450.0, 250.0);
 Chart chart = shape.getChart();
 ChartSeriesCollection series = chart.getSeries();

 // Delete default generated series.
 series.clear();

 String[] categories = new String[] { "Category 1", "Category 2", "Category 3" };
 series.add("Series 1 of primary series group", categories, new double[] { 2.0, 3.0, 4.0 });
 series.add("Series 2 of primary series group", categories, new double[] { 5.0, 2.0, 3.0 });

 // Create an additional series group, also of the line type.
 ChartSeriesGroup newSeriesGroup = chart.getSeriesGroups().add(ChartSeriesType.LINE);
 // Specify the use of secondary axes for the new series group.
 newSeriesGroup.setAxisGroup(AxisGroup.SECONDARY);
 // Hide the secondary X axis.
 newSeriesGroup.getAxisX().setHidden(true);
 // Define title of the secondary Y axis.
 newSeriesGroup.getAxisY().getTitle().setShow(true);
 newSeriesGroup.getAxisY().getTitle().setText("Secondary Y axis");

 // Add a series to the new series group.
 ChartSeries series3 =
         newSeriesGroup.getSeries().add("Series of secondary series group", categories, new double[] { 13.0, 11.0, 16.0 });
 series3.getFormat().getStroke().setWeight(3.5);

 doc.save(getArtifactsDir() + "Charts.SecondaryAxis.docx");
 

Returns: ChartAxis - The corresponding ChartAxis value.

getAxisY()

public ChartAxis getAxisY()

Provides access to properties of the Y axis of this series group.

Examples:

Shows how to work with the secondary axis of chart.


 Document doc = new Document();
 DocumentBuilder builder = new DocumentBuilder(doc);

 Shape shape = builder.insertChart(ChartType.LINE, 450.0, 250.0);
 Chart chart = shape.getChart();
 ChartSeriesCollection series = chart.getSeries();

 // Delete default generated series.
 series.clear();

 String[] categories = new String[] { "Category 1", "Category 2", "Category 3" };
 series.add("Series 1 of primary series group", categories, new double[] { 2.0, 3.0, 4.0 });
 series.add("Series 2 of primary series group", categories, new double[] { 5.0, 2.0, 3.0 });

 // Create an additional series group, also of the line type.
 ChartSeriesGroup newSeriesGroup = chart.getSeriesGroups().add(ChartSeriesType.LINE);
 // Specify the use of secondary axes for the new series group.
 newSeriesGroup.setAxisGroup(AxisGroup.SECONDARY);
 // Hide the secondary X axis.
 newSeriesGroup.getAxisX().setHidden(true);
 // Define title of the secondary Y axis.
 newSeriesGroup.getAxisY().getTitle().setShow(true);
 newSeriesGroup.getAxisY().getTitle().setText("Secondary Y axis");

 // Add a series to the new series group.
 ChartSeries series3 =
         newSeriesGroup.getSeries().add("Series of secondary series group", categories, new double[] { 13.0, 11.0, 16.0 });
 series3.getFormat().getStroke().setWeight(3.5);

 doc.save(getArtifactsDir() + "Charts.SecondaryAxis.docx");
 

Returns: ChartAxis - The corresponding ChartAxis value.

getBubbleScale()

public int getBubbleScale()

Gets the size of the bubbles as a percentage of their default size.

Remarks:

Applies only to series groups of the ChartSeriesType.BUBBLE and ChartSeriesType.BUBBLE_3_D types.

The range of acceptable values is from 0 to 300 inclusive. The default value is 100.

Examples:

Show how to set size of the bubbles.


 Document doc = new Document();
 DocumentBuilder builder = new DocumentBuilder(doc);

 // Insert a bubble 3D chart.
 Shape shape = builder.insertChart(ChartType.BUBBLE_3_D, 450.0, 250.0);
 ChartSeriesGroup seriesGroup = shape.getChart().getSeriesGroups().get(0);

 // Set bubble scale to 200%.
 seriesGroup.setBubbleScale(200);

 doc.save(getArtifactsDir() + "Charts.BubbleScale.docx");
 

Returns: int - The size of the bubbles as a percentage of their default size.

getDoughnutHoleSize()

public int getDoughnutHoleSize()

Gets the hole size of the parent doughnut chart as a percentage.

Remarks:

Applies only to series groups of the ChartSeriesType.DOUGHNUT type.

The range of acceptable values is from 0 to 90 inclusive. The default value is 75.

Examples:

Shows how to create and format Doughnut chart.


 Document doc = new Document();
 DocumentBuilder builder = new DocumentBuilder(doc);

 Shape shape = builder.insertChart(ChartType.DOUGHNUT, 400.0, 400.0);
 Chart chart = shape.getChart();
 // Delete the default generated series.
 chart.getSeries().clear();

 String[] categories = new String[] { "Category 1", "Category 2", "Category 3" };
 chart.getSeries().add("Series 1", categories, new double[] { 4.0, 2.0, 5.0 });

 // Format the Doughnut chart.
 ChartSeriesGroup seriesGroup = chart.getSeriesGroups().get(0);
 seriesGroup.setDoughnutHoleSize(10);
 seriesGroup.setFirstSliceAngle(270);

 doc.save(getArtifactsDir() + "Charts.DoughnutChart.docx");
 

Returns: int - The hole size of the parent doughnut chart as a percentage.

getFirstSliceAngle()

public int getFirstSliceAngle()

Gets the angle, in degrees, of the first slice of the parent pie chart.

Remarks:

Applies to series groups of the ChartSeriesType.PIE, ChartSeriesType.PIE_3_D and ChartSeriesType.DOUGHNUT types.

The range of acceptable values is from 0 to 360 inclusive. The default value is 0.

Examples:

Shows how to create and format Doughnut chart.


 Document doc = new Document();
 DocumentBuilder builder = new DocumentBuilder(doc);

 Shape shape = builder.insertChart(ChartType.DOUGHNUT, 400.0, 400.0);
 Chart chart = shape.getChart();
 // Delete the default generated series.
 chart.getSeries().clear();

 String[] categories = new String[] { "Category 1", "Category 2", "Category 3" };
 chart.getSeries().add("Series 1", categories, new double[] { 4.0, 2.0, 5.0 });

 // Format the Doughnut chart.
 ChartSeriesGroup seriesGroup = chart.getSeriesGroups().get(0);
 seriesGroup.setDoughnutHoleSize(10);
 seriesGroup.setFirstSliceAngle(270);

 doc.save(getArtifactsDir() + "Charts.DoughnutChart.docx");
 

Returns: int - The angle, in degrees, of the first slice of the parent pie chart.

getGapWidth()

public int getGapWidth()

Gets the percentage of gap width between chart elements.

Remarks:

Applies only to series groups of the bar, column, pie-of-bar, pie-of-pie, histogram, box&whisker, waterfall and funnel types.

The range of acceptable values is from 0 to 500 inclusive. For bar/column-based series groups, the property represents the space between bar clusters as a percentage of their width. For pie-of-pie and bar-of-pie charts, this is the space between the primary and secondary sections of the chart.

Examples:

Show how to configure gap width and overlap.


 Document doc = new Document();
 DocumentBuilder builder = new DocumentBuilder(doc);

 Shape shape = builder.insertChart(ChartType.COLUMN, 450.0, 250.0);
 ChartSeriesGroup seriesGroup = shape.getChart().getSeriesGroups().get(0);

 // Set column gap width and overlap.
 seriesGroup.setGapWidth(450);
 seriesGroup.setOverlap(-75);

 doc.save(getArtifactsDir() + "Charts.ConfigureGapOverlap.docx");
 

Returns: int - The percentage of gap width between chart elements.

getOverlap()

public int getOverlap()

Gets the percentage of how much the series bars or columns overlap.

Remarks:

Applies to series groups of all bar and column types.

The range of acceptable values is from -100 to 100 inclusive. A value of 0 indicates that there is no space between bars/columns. If the value is -100, the distance between bars/columns is equal to their width. A value of 100 means that the bars/columns overlap completely.

Examples:

Show how to configure gap width and overlap.


 Document doc = new Document();
 DocumentBuilder builder = new DocumentBuilder(doc);

 Shape shape = builder.insertChart(ChartType.COLUMN, 450.0, 250.0);
 ChartSeriesGroup seriesGroup = shape.getChart().getSeriesGroups().get(0);

 // Set column gap width and overlap.
 seriesGroup.setGapWidth(450);
 seriesGroup.setOverlap(-75);

 doc.save(getArtifactsDir() + "Charts.ConfigureGapOverlap.docx");
 

Returns: int - The percentage of how much the series bars or columns overlap.

getSecondSectionSize()

public int getSecondSectionSize()

Gets the size of the pie chart secondary section as a percentage.

Remarks:

Applies to series groups of the ChartSeriesType.PIE_OF_PIE and ChartSeriesType.PIE_OF_BAR types.

The range of acceptable values is from 5 to 200 inclusive. The default value is 75.

Examples:

Shows how to create and format pie of Pie chart.


 Document doc = new Document();
 DocumentBuilder builder = new DocumentBuilder(doc);

 Shape shape = builder.insertChart(ChartType.PIE_OF_PIE, 440.0, 300.0);
 Chart chart = shape.getChart();
 // Delete the default generated series.
 chart.getSeries().clear();

 String[] categories = new String[] { "Category 1", "Category 2", "Category 3", "Category 4" };
 chart.getSeries().add("Series 1", categories, new double[] { 11.0, 8.0, 4.0, 3.0 });

 // Format the Pie of Pie chart.
 ChartSeriesGroup seriesGroup = chart.getSeriesGroups().get(0);
 seriesGroup.setGapWidth(10);
 seriesGroup.setSecondSectionSize(77);

 doc.save(getArtifactsDir() + "Charts.PieOfPieChart.docx");
 

Returns: int - The size of the pie chart secondary section as a percentage.

getSeries()

public ChartSeriesCollection getSeries()

Gets a collection of series that belong to this series group.

Examples:

Shows how to work with the secondary axis of chart.


 Document doc = new Document();
 DocumentBuilder builder = new DocumentBuilder(doc);

 Shape shape = builder.insertChart(ChartType.LINE, 450.0, 250.0);
 Chart chart = shape.getChart();
 ChartSeriesCollection series = chart.getSeries();

 // Delete default generated series.
 series.clear();

 String[] categories = new String[] { "Category 1", "Category 2", "Category 3" };
 series.add("Series 1 of primary series group", categories, new double[] { 2.0, 3.0, 4.0 });
 series.add("Series 2 of primary series group", categories, new double[] { 5.0, 2.0, 3.0 });

 // Create an additional series group, also of the line type.
 ChartSeriesGroup newSeriesGroup = chart.getSeriesGroups().add(ChartSeriesType.LINE);
 // Specify the use of secondary axes for the new series group.
 newSeriesGroup.setAxisGroup(AxisGroup.SECONDARY);
 // Hide the secondary X axis.
 newSeriesGroup.getAxisX().setHidden(true);
 // Define title of the secondary Y axis.
 newSeriesGroup.getAxisY().getTitle().setShow(true);
 newSeriesGroup.getAxisY().getTitle().setText("Secondary Y axis");

 // Add a series to the new series group.
 ChartSeries series3 =
         newSeriesGroup.getSeries().add("Series of secondary series group", categories, new double[] { 13.0, 11.0, 16.0 });
 series3.getFormat().getStroke().setWeight(3.5);

 doc.save(getArtifactsDir() + "Charts.SecondaryAxis.docx");
 

Returns: ChartSeriesCollection - A collection of series that belong to this series group.

getSeriesType()

public int getSeriesType()

Gets the type of chart series included in this group.

Returns: int - The type of chart series included in this group. The returned value is one of ChartSeriesType constants.

setAxisGroup(int value)

public void setAxisGroup(int value)

Sets the axis group to which this series group belongs.

Examples:

Shows how to work with the secondary axis of chart.


 Document doc = new Document();
 DocumentBuilder builder = new DocumentBuilder(doc);

 Shape shape = builder.insertChart(ChartType.LINE, 450.0, 250.0);
 Chart chart = shape.getChart();
 ChartSeriesCollection series = chart.getSeries();

 // Delete default generated series.
 series.clear();

 String[] categories = new String[] { "Category 1", "Category 2", "Category 3" };
 series.add("Series 1 of primary series group", categories, new double[] { 2.0, 3.0, 4.0 });
 series.add("Series 2 of primary series group", categories, new double[] { 5.0, 2.0, 3.0 });

 // Create an additional series group, also of the line type.
 ChartSeriesGroup newSeriesGroup = chart.getSeriesGroups().add(ChartSeriesType.LINE);
 // Specify the use of secondary axes for the new series group.
 newSeriesGroup.setAxisGroup(AxisGroup.SECONDARY);
 // Hide the secondary X axis.
 newSeriesGroup.getAxisX().setHidden(true);
 // Define title of the secondary Y axis.
 newSeriesGroup.getAxisY().getTitle().setShow(true);
 newSeriesGroup.getAxisY().getTitle().setText("Secondary Y axis");

 // Add a series to the new series group.
 ChartSeries series3 =
         newSeriesGroup.getSeries().add("Series of secondary series group", categories, new double[] { 13.0, 11.0, 16.0 });
 series3.getFormat().getStroke().setWeight(3.5);

 doc.save(getArtifactsDir() + "Charts.SecondaryAxis.docx");
 

Parameters:

ParameterTypeDescription
valueintThe axis group to which this series group belongs. The value must be one of AxisGroup constants.

setBubbleScale(int value)

public void setBubbleScale(int value)

Sets the size of the bubbles as a percentage of their default size.

Remarks:

Applies only to series groups of the ChartSeriesType.BUBBLE and ChartSeriesType.BUBBLE_3_D types.

The range of acceptable values is from 0 to 300 inclusive. The default value is 100.

Examples:

Show how to set size of the bubbles.


 Document doc = new Document();
 DocumentBuilder builder = new DocumentBuilder(doc);

 // Insert a bubble 3D chart.
 Shape shape = builder.insertChart(ChartType.BUBBLE_3_D, 450.0, 250.0);
 ChartSeriesGroup seriesGroup = shape.getChart().getSeriesGroups().get(0);

 // Set bubble scale to 200%.
 seriesGroup.setBubbleScale(200);

 doc.save(getArtifactsDir() + "Charts.BubbleScale.docx");
 

Parameters:

ParameterTypeDescription
valueintThe size of the bubbles as a percentage of their default size.

setDoughnutHoleSize(int value)

public void setDoughnutHoleSize(int value)

Sets the hole size of the parent doughnut chart as a percentage.

Remarks:

Applies only to series groups of the ChartSeriesType.DOUGHNUT type.

The range of acceptable values is from 0 to 90 inclusive. The default value is 75.

Examples:

Shows how to create and format Doughnut chart.


 Document doc = new Document();
 DocumentBuilder builder = new DocumentBuilder(doc);

 Shape shape = builder.insertChart(ChartType.DOUGHNUT, 400.0, 400.0);
 Chart chart = shape.getChart();
 // Delete the default generated series.
 chart.getSeries().clear();

 String[] categories = new String[] { "Category 1", "Category 2", "Category 3" };
 chart.getSeries().add("Series 1", categories, new double[] { 4.0, 2.0, 5.0 });

 // Format the Doughnut chart.
 ChartSeriesGroup seriesGroup = chart.getSeriesGroups().get(0);
 seriesGroup.setDoughnutHoleSize(10);
 seriesGroup.setFirstSliceAngle(270);

 doc.save(getArtifactsDir() + "Charts.DoughnutChart.docx");
 

Parameters:

ParameterTypeDescription
valueintThe hole size of the parent doughnut chart as a percentage.

setFirstSliceAngle(int value)

public void setFirstSliceAngle(int value)

Sets the angle, in degrees, of the first slice of the parent pie chart.

Remarks:

Applies to series groups of the ChartSeriesType.PIE, ChartSeriesType.PIE_3_D and ChartSeriesType.DOUGHNUT types.

The range of acceptable values is from 0 to 360 inclusive. The default value is 0.

Examples:

Shows how to create and format Doughnut chart.


 Document doc = new Document();
 DocumentBuilder builder = new DocumentBuilder(doc);

 Shape shape = builder.insertChart(ChartType.DOUGHNUT, 400.0, 400.0);
 Chart chart = shape.getChart();
 // Delete the default generated series.
 chart.getSeries().clear();

 String[] categories = new String[] { "Category 1", "Category 2", "Category 3" };
 chart.getSeries().add("Series 1", categories, new double[] { 4.0, 2.0, 5.0 });

 // Format the Doughnut chart.
 ChartSeriesGroup seriesGroup = chart.getSeriesGroups().get(0);
 seriesGroup.setDoughnutHoleSize(10);
 seriesGroup.setFirstSliceAngle(270);

 doc.save(getArtifactsDir() + "Charts.DoughnutChart.docx");
 

Parameters:

ParameterTypeDescription
valueintThe angle, in degrees, of the first slice of the parent pie chart.

setGapWidth(int value)

public void setGapWidth(int value)

Sets the percentage of gap width between chart elements.

Remarks:

Applies only to series groups of the bar, column, pie-of-bar, pie-of-pie, histogram, box&whisker, waterfall and funnel types.

The range of acceptable values is from 0 to 500 inclusive. For bar/column-based series groups, the property represents the space between bar clusters as a percentage of their width. For pie-of-pie and bar-of-pie charts, this is the space between the primary and secondary sections of the chart.

Examples:

Show how to configure gap width and overlap.


 Document doc = new Document();
 DocumentBuilder builder = new DocumentBuilder(doc);

 Shape shape = builder.insertChart(ChartType.COLUMN, 450.0, 250.0);
 ChartSeriesGroup seriesGroup = shape.getChart().getSeriesGroups().get(0);

 // Set column gap width and overlap.
 seriesGroup.setGapWidth(450);
 seriesGroup.setOverlap(-75);

 doc.save(getArtifactsDir() + "Charts.ConfigureGapOverlap.docx");
 

Parameters:

ParameterTypeDescription
valueintThe percentage of gap width between chart elements.

setOverlap(int value)

public void setOverlap(int value)

Sets the percentage of how much the series bars or columns overlap.

Remarks:

Applies to series groups of all bar and column types.

The range of acceptable values is from -100 to 100 inclusive. A value of 0 indicates that there is no space between bars/columns. If the value is -100, the distance between bars/columns is equal to their width. A value of 100 means that the bars/columns overlap completely.

Examples:

Show how to configure gap width and overlap.


 Document doc = new Document();
 DocumentBuilder builder = new DocumentBuilder(doc);

 Shape shape = builder.insertChart(ChartType.COLUMN, 450.0, 250.0);
 ChartSeriesGroup seriesGroup = shape.getChart().getSeriesGroups().get(0);

 // Set column gap width and overlap.
 seriesGroup.setGapWidth(450);
 seriesGroup.setOverlap(-75);

 doc.save(getArtifactsDir() + "Charts.ConfigureGapOverlap.docx");
 

Parameters:

ParameterTypeDescription
valueintThe percentage of how much the series bars or columns overlap.

setSecondSectionSize(int value)

public void setSecondSectionSize(int value)

Sets the size of the pie chart secondary section as a percentage.

Remarks:

Applies to series groups of the ChartSeriesType.PIE_OF_PIE and ChartSeriesType.PIE_OF_BAR types.

The range of acceptable values is from 5 to 200 inclusive. The default value is 75.

Examples:

Shows how to create and format pie of Pie chart.


 Document doc = new Document();
 DocumentBuilder builder = new DocumentBuilder(doc);

 Shape shape = builder.insertChart(ChartType.PIE_OF_PIE, 440.0, 300.0);
 Chart chart = shape.getChart();
 // Delete the default generated series.
 chart.getSeries().clear();

 String[] categories = new String[] { "Category 1", "Category 2", "Category 3", "Category 4" };
 chart.getSeries().add("Series 1", categories, new double[] { 11.0, 8.0, 4.0, 3.0 });

 // Format the Pie of Pie chart.
 ChartSeriesGroup seriesGroup = chart.getSeriesGroups().get(0);
 seriesGroup.setGapWidth(10);
 seriesGroup.setSecondSectionSize(77);

 doc.save(getArtifactsDir() + "Charts.PieOfPieChart.docx");
 

Parameters:

ParameterTypeDescription
valueintThe size of the pie chart secondary section as a percentage.