IChartDataTable Properties |
The IChartDataTable type exposes the following members.
Name | Description | |
---|---|---|
![]() |
BackgroundMode |
Gets or sets the background mode of the chart, which determines how the background is rendered.
|
![]() |
Color |
Gets / sets font color. Searches for the closestes color in
the workbook palette.
(Inherited from
IFont
.)
|
![]() |
FontName |
Returns or sets the font name. Read / write string.
(Inherited from
IFont
.)
|
![]() ![]() |
HasBorders |
True if data table has borders.
![]()
The following code illustrates how to outline borders of IChartDataTable object:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>workbook.LoadFromFile("Sample.xlsx");</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Create chart and set range</para><para>IChart chart = worksheet.Charts.Add();</para><para>chart.DataRange = worksheet.Range["A1:F2"];</para><para>//Set chart type</para><para>chart.ChartType = ExcelChartType.ColumnClustered;</para><para>//Enabling the data table</para><para>chart.HasDataTable = true;</para><para>//Get data table of the chart</para><para>IChartDataTable dataTable = chart.DataTable;</para><para>//Set false to remove the borders in data table</para><para>dataTable.HasBorders = false;</para><para>//Save to file</para><para>workbook.SaveToFile("Chart.xlsx");</para>
|
![]() ![]() |
HasHorzBorder |
True if data table has horizontal border.
![]()
The following code illustrates how to remove horizontal border for IChartDataTable object:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>workbook.LoadFromFile("Sample.xlsx");</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Create chart and set range</para><para>IChart chart = worksheet.Charts.Add();</para><para>chart.DataRange = worksheet.Range["A1:F2"];</para><para>//Set chart type</para><para>chart.ChartType = ExcelChartType.ColumnClustered;</para><para>//Enabling the data table</para><para>chart.HasDataTable = true;</para><para>//Get data table of the chart</para><para>IChartDataTable dataTable = chart.DataTable;</para><para>//Set false to remove the horizontal border in data table</para><para>dataTable.HasHorzBorder = false;</para><para>//Save to file</para><para>workbook.SaveToFile("Chart.xlsx");</para>
|
![]() ![]() |
HasVertBorder |
True if data table has vertical border.
![]()
The following code illustrates how to remove vertical border for IChartDataTable object:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>workbook.LoadFromFile("Sample.xlsx");</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Create chart and set range</para><para>IChart chart = worksheet.Charts.Add();</para><para>chart.DataRange = worksheet.Range["A1:F2"];</para><para>//Set chart type</para><para>chart.ChartType = ExcelChartType.ColumnClustered;</para><para>//Enabling the data table</para><para>chart.HasDataTable = true;</para><para>//Get data table of the chart</para><para>IChartDataTable dataTable = chart.DataTable;</para><para>//Set false to remove the vertical border in data table</para><para>dataTable.HasVertBorder = false;</para><para>//Save to file</para><para>workbook.SaveToFile("Chart.xlsx");</para>
|
![]() |
IsAutoColor |
Indicates whether color is automatically selected. Read-only.
(Inherited from
IFont
.)
|
![]() |
IsBold |
True if the font is bold. Read / write Boolean.
(Inherited from
IFont
.)
|
![]() |
IsItalic |
True if the font style is italic. Read / write Boolean.
(Inherited from
IFont
.)
|
![]() |
IsStrikethrough |
True if the font is struck through with a horizontal line.
Read / write Boolean
(Inherited from
IFont
.)
|
![]() |
IsSubscript |
True if the font is formatted as subscript.
False by default. Read / write Boolean.
(Inherited from
IFont
.)
|
![]() |
IsSuperscript |
True if the font is formatted as superscript. False by default.
Read/write Boolean
(Inherited from
IFont
.)
|
![]() |
KnownColor |
Returns or sets the primary color of the object, as shown in the
following table. Use the RGB function to create a color value.
Read / write Integer.
(Inherited from
IFont
.)
|
![]() |
Parent |
Gets the parent object of the current instance.
(Inherited from
IExcelApplication
.)
|
![]() ![]() |
ShowSeriesKeys |
True if there is series keys in the data table.
![]()
The following code illustrates how to show series keys in the IChartDataTable object:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>workbook.LoadFromFile("Sample.xlsx");</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Create chart and set range</para><para>IChart chart = worksheet.Charts.Add();</para><para>chart.DataRange = worksheet.Range["A1:F2"];</para><para>//Set chart type</para><para>chart.ChartType = ExcelChartType.ColumnClustered;</para><para>//Enabling the data table</para><para>chart.HasDataTable = true;</para><para>//Get data table of the chart</para><para>IChartDataTable dataTable = chart.DataTable;</para><para>//Set true to show series keys in the data table</para><para>dataTable.ShowSeriesKeys = true;</para><para>//Save to file</para><para>workbook.SaveToFile("Chart.xlsx");</para>
|
![]() |
Size |
Returns or sets the size of the font. Read / write Variant.
(Inherited from
IFont
.)
|
![]() |
StrikethroughType |
Strikethrough Type.
Read / write sngStrike dblStrike
(Inherited from
IFont
.)
|
![]() |
Underline |
Returns or sets the type of underline applied to the font. Can
be one of the following FontUnderlineTypeStyle constants.
Read / write FontUnderlineType.
(Inherited from
IFont
.)
|
![]() |
VerticalAlignment |
Gets / sets font vertical alignment.
(Inherited from
IFont
.)
|