📚
OpenXML-Office
v3.x (Discontinued)
v3.x (Discontinued)
  • Welcome
    • Getting Started
    • Introduction
    • Privacy Policy
    • License
  • Presentation
    • PowerPoint
    • Slide
    • Shape
    • Picture
    • Textbox
    • Table
    • Chart
      • Area
      • Bar
      • Column
      • Line
      • Pie
      • Scatter
      • Combo
      • Waterfall
  • Spreadsheet
    • Excel
    • Worksheet
    • Shape
    • Picture
    • Table
    • Chart
      • Area
      • Bar
      • Column
      • Line
      • Pie
      • Scatter
      • Combo
    • Style
    • Shared
  • Document
    • Word
    • Pages
    • Shape
    • Picture
    • Table
    • Chart
Powered by GitBook
On this page
  • Basic Code Sample
  • BarChartSetting Options
  • BarChartDataLabel Options
  • barChartSeriesSetting Options
  • BarGraphicsSetting Options only applied in cluster type
  • BarChartDataPointSetting Options

Was this helpful?

  1. Spreadsheet
  2. Chart

Bar

PreviousAreaNextColumn

Was this helpful?

Add chart method present in worksheet component. By default the anchor is at 1,1 aka A1 cell.

Basic Code Sample

Worksheet worksheet = excel1.AddSheet("Bar Chart");
	worksheet.AddChart(new()
	{
		cellIdStart = "A1",
		cellIdEnd = "D4"
	}, new BarChartSetting<ExcelSetting>()
	{
		applicationSpecificSetting = new()
		{
			from = new()
			{
				row = 5,
				column = 5
			},
			to = new()
			{
				row = 20,
				column = 20
			}
		}
	});

BarChartSetting Options

Property
Type
Details

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

Property
Type
Details

dataLabelPosition

DataLabelPositionValues

Data Label placement options.

barChartSeriesSetting Options

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

Property
Type
Details

categoryGap

int

Gap between Category. Default : 219

seriesGap

int

Gap between Series. Default : -27

BarChartDataPointSetting Options

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

List<?>

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

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

List<?>

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

BarChartDataLabel
BarChartSeriesSetting
BarGraphicsSetting
BarChartDataLabel
BarChartDataPointSetting
ChartSetting
ChartDataLabel
ChartSeriesSetting
ChartDataPointSetting
ChartAxesOptions