IChartTextArea Properties |
The IChartTextArea type exposes the following members.
Name | Description | |
---|---|---|
![]() ![]() |
BackgroundMode |
Display mode of the background.
![]()
The following code illustrates the use of BackgroundMode property:
<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</para><para>IChart chart = worksheet.Charts.Add();</para><para>//Set range</para><para>chart.DataRange = worksheet.Range["B2:C6"];</para><para>//Set chart type</para><para>chart.ChartType = ExcelChartType.Cone3DClustered;</para><para>//Set the Area's text in the chart</para><para>chart.ChartTitleArea.Text = "Student Chart";</para><para>//Set the Display mode of the background</para><para>chart.ChartTitleArea.BackgroundMode = ChartBackgroundMode.Opaque;</para><para>//Save to file</para><para>workbook.SaveToFile("Chart.xlsx");</para>
|
![]() |
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
.)
|
![]() ![]() |
FrameFormat |
Return format of the text area.
![]()
The following code illustrates the use of FrameFormat property:
<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</para><para>IChart chart = worksheet.Charts.Add();</para><para>//Set range</para><para>chart.DataRange = worksheet.Range["B2:C6"];</para><para>//Set chart type</para><para>chart.ChartType = ExcelChartType.Cone3DClustered;</para><para>//Get the formatting options of the chart for text area</para><para>chart.ChartTitleArea.Text = "Student Chart";</para><para>chart.ChartTitleArea.FrameFormat.Border.Color = Color.Brown;</para><para>chart.ChartTitleArea.FrameFormat.Interior.Pattern = ExcelPatternType.Percent25;</para><para>//Save to file</para><para>workbook.SaveToFile("Chart.xlsx");</para>
|
![]() |
IsAutoColor |
Indicates whether color is automatically selected. Read-only.
(Inherited from
IFont
.)
|
![]() ![]() |
IsAutoMode |
True if background is set to automatic.
![]()
The following code illustrates the use of IsAutoMode property:
<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</para><para>IChart chart = worksheet.Charts.Add();</para><para>//Set range</para><para>chart.DataRange = worksheet.Range["B2:C6"];</para><para>//Set chart type</para><para>chart.ChartType = ExcelChartType.Cone3DClustered;</para><para>//Set the Area's text in the chart</para><para>chart.ChartTitleArea.Text = "Student Chart";</para><para>//True if background is set to automatic</para><para>Console.WriteLine(chart.ChartTitleArea.IsAutoMode);</para><para>//Save to file</para><para>workbook.SaveToFile("Chart.xlsx");</para>
|
![]() |
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
.)
|
![]() |
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
.)
|
![]() ![]() |
Text |
Area's text.Some items(such as legend,axis...) maybe invalid.
![]()
The following code illustrates the use of Text property:
<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</para><para>IChart chart = worksheet.Charts.Add();</para><para>//Set range</para><para>chart.DataRange = worksheet.Range["B2:C6"];</para><para>//Set chart type</para><para>chart.ChartType = ExcelChartType.Cone3DClustered;</para><para>//Set the Area's text in the chart</para><para>chart.ChartTitleArea.Text = "Student Chart";</para><para>//Save to file</para><para>workbook.SaveToFile("Chart.xlsx");</para>
|
![]() ![]() |
TextRotationAngle |
Text rotation angle.
![]()
The following code illustrates the use of TextRotationAngle property:
<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</para><para>IChart chart = worksheet.Charts.Add();</para><para>//Set range</para><para>chart.DataRange = worksheet.Range["B2:C6"];</para><para>//Set chart type</para><para>chart.ChartType = ExcelChartType.Cone3DClustered;</para><para>//Set the Area's text in the chart</para><para>chart.ChartTitleArea.Text = "Student Chart";</para><para>//Set the Text rotation angle</para><para>chart.ChartTitleArea.TextRotationAngle = 30;</para><para>//Save to file</para><para>workbook.SaveToFile("Chart.xlsx");</para>
|
![]() |
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
.)
|