Skip to content

This content is for v1.x (Discontinued). Switch to the Stable version.

Add chart method present in slide component or you can replace the chart using shape component.

// Bare minimum
powerPoint.AddSlide(PresentationConstants.SlideLayoutType.BLANK)
.AddChart(CreateDataCellPayload(), new G.PieChartSetting<G.PresentationSetting>());
// Some additional samples
powerPoint.AddSlide(PresentationConstants.SlideLayoutType.BLANK)
.AddChart(CreateDataCellPayload(), new G.PieChartSetting<G.PresentationSetting>()
{
pieChartTypes = G.PieChartTypes.DOUGHNUT,
pieChartDataLabel = new()
{
dataLabelPosition = G.PieChartDataLabel.DataLabelPositionValues.SHOW,
showCategoryName = true,
showValue = true,
separator = ". "
}
});

PieChartSetting<G.PresentationSetting> Options

Section titled “PieChartSetting<G.PresentationSetting> Options”

Contains options details extended from ChartSetting that are specific to pie chart.

PropertyTypeDetails
pieChartDataLabelPieChartDataLabelGeneral Data label option applied for all series
pieChartSeriesSettingsList<PieChartSeriesSetting?>Data Series specific options are used from the list. The position on the list is matched with the data series position. you can use null to skip a series
pieChartTypesPieChartTypesType of chart
doughnutHoleSizeuint
angleOfFirstSliceuint
pointExplosionuint

Contains options details extended from ChartDataLabel that are specific to pie chart.

PropertyTypeDetails
dataLabelPositionDataLabelPositionValuesData Label placement options.

Contains options details extended from ChartSeriesSetting that are specific to pie chart.

PropertyTypeDetails
pieChartDataLabelPieChartDataLabelData Label Option specific to one series
fillColorstring?Fill color specific to one series
borderColorstring?Border color specific to one series
pieChartDataPointSettingsList<PieChartDataPointSetting?>TODO