Skip to content

Area

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

using G = OpenXMLOffice.Global_2007;
// Bare minimum
powerPoint.AddSlide(PresentationConstants.SlideLayoutType.BLANK)
.AddChart(CreateDataCellPayload(), new G.AreaChartSetting<G.PresentationSetting>());
// Some additional samples
powerPoint.AddSlide(PresentationConstants.SlideLayoutType.BLANK)
.AddChart(CreateDataCellPayload(), new G.AreaChartSetting<G.PresentationSetting>()
{
areaChartTypes = G.AreaChartTypes.STACKED,
chartAxesOptions = new()
{
horizontalFontSize = 20,
verticalFontSize = 25
}
});

AreaChartSetting<G.PresentationSetting> Options

Section titled “AreaChartSetting<G.PresentationSetting> Options”

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

PropertyTypeDetails
areaChartDataLabelAreaChartDataLabelGeneral Data label option applied for all series
areaChartSeriesSettingsList<AreaChartSeriesSetting?>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
areaChartTypesAreaChartTypesType of chart
chartAxesOptionsChartAxesOptionsChart axes options

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

PropertyTypeDetails
dataLabelPositionDataLabelPositionValuesData Label placement options.

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

areaChartDataLabelAreaChartDataLabelData Label Option specific to one series
fillColorstring?Fill color specific to one series