📚
OpenXML-Office
v1.x
v1.x
  • Getting Started
  • Introduction
  • Presentation
    • PowerPoint
    • Slide
    • Shape
    • Picture
    • Chart
      • Area
      • Bar
      • Column
      • Line
      • Pie
      • Scatter
      • Combo
      • Waterfall
    • Table
    • Textbox
  • Excel
    • Spreadsheet
    • Worksheet
    • Style
  • LICENSE
Powered by GitBook
On this page
  • Basic Code Sample
  • PieChartSetting Options
  • PieChartDataLabel Options
  • PieChartSeriesSetting Options

Was this helpful?

  1. Presentation
  2. Chart

Pie

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

Basic Code Sample

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

PieChartSetting Options

Property
Type
Details

pieChartDataLabel

General Data label option applied for all series

pieChartSeriesSettings

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

pieChartTypes

PieChartTypes

Type of chart

doughnutHoleSize

uint

angleOfFirstSlice

uint

pointExplosion

uint

PieChartDataLabel Options

Property
Type
Details

dataLabelPosition

DataLabelPositionValues

Data Label placement options.

PieChartSeriesSetting Options

Property
Type
Details

pieChartDataLabel

Data Label Option specific to one series

fillColor

string?

Fill color specific to one series

borderColor

string?

Border color specific to one series

pieChartDataPointSettings

List<PieChartDataPointSetting?>

TODO

PreviousLineNextScatter

Last updated 1 year ago

Was this helpful?

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

List<?>

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

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

PieChartDataLabel
PieChartSeriesSetting
PieChartDataLabel
ChartSetting
ChartDataLabel
ChartSeriesSetting