Bar

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.BarChartSetting());
// Some additional samples
powerPoint.AddSlide(PresentationConstants.SlideLayoutType.BLANK)
	.AddChart(CreateDataCellPayload(), new G.BarChartSetting()
	{
		chartAxesOptions = new()
		{
			isHorizontalAxesEnabled = false,
		},
		barChartDataLabel = new G.BarChartDataLabel()
		{
			dataLabelPosition = G.BarChartDataLabel.DataLabelPositionValues.INSIDE_END,
			showValue = true,
		},
		barChartSeriesSettings = new(){
			new(),
			new(){
				barChartDataLabel = new G.BarChartDataLabel(){
					dataLabelPosition = G.BarChartDataLabel.DataLabelPositionValues.OUTSIDE_END,
					showCategoryName= true
				}
			}
		}
	});

BarChartSetting Options

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

PropertyTypeDetails

barChartDataLabel

General Data label option applied for all series

barChartSeriesSettings

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

barChartTypes

BarChartTypes

Type of chart

chartAxesOptions

Chart axes options

barGraphicsSetting

Set properties related to bar placement

BarChartDataLabel Options

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

PropertyTypeDetails

dataLabelPosition

DataLabelPositionValues

Data Label placement options.

barChartSeriesSetting Options

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

barChartDataLabel

Data Label Option specific to one series

fillColor

string?

Fill color specific to one series

barChartDataPointSettings

Data point specific options are used from the list. The position on the list is matched with the data point position. you can use null to skip a data point.

BarGraphicsSetting Options only applied in cluster type

PropertyTypeDetails

categoryGap

int

Gap between Category. Default : 219

seriesGap

int

Gap between Series. Default : -27

BarChartDataPointSetting Options

Contains options details extended from ChartDataPointSetting that are specific to bar chart.

Last updated