Class ChartTextArea
public class ChartTextArea : XlsObject, IDisposable, IChartDataLabels, IChartTextArea, IFont, IExcelApplication, IOptimizedUpdate
- Inheritance
-
ChartTextArea
- Implements
- Inherited Members
Properties
BackgroundMode
Display mode of the background.
//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chartIChart chart = worksheet.Charts.Add();//Set rangechart.DataRange = worksheet.Range["B2:C6"];//Set chart typechart.ChartType = ExcelChartType.Cone3DClustered;//Set the Area's text in the chartchart.ChartTitleArea.Text = "Student Chart";//Set the Display mode of the backgroundchart.ChartTitleArea.BackgroundMode = ChartBackgroundMode.Opaque;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public ChartBackgroundMode BackgroundMode { get; set; }
Property Value
Color
public Color Color { get; set; }
Property Value
Delimiter
Delimeter.
public string Delimiter { get; set; }
Property Value
Font
Returns FontImpl for current font. Read-only.
[Obsolete("This properties is obsolete. \r Modify properties of fontImpl will affect others. Recommend direct use properties of ChartTitleArea\r modify the font style of ChartTitleArea.")]
public FontWrapper Font { get; }
Property Value
FontName
public string FontName { get; set; }
Property Value
FrameFormat
Return format of the text area.
//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chartIChart chart = worksheet.Charts.Add();//Set rangechart.DataRange = worksheet.Range["B2:C6"];//Set chart typechart.ChartType = ExcelChartType.Cone3DClustered;//Get the formatting options of the chart for text areachart.ChartTitleArea.Text = "Student Chart";chart.ChartTitleArea.FrameFormat.Border.Color = Color.Brown;chart.ChartTitleArea.FrameFormat.Interior.Pattern = ExcelPatternType.Percent25;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public IChartFrameFormat FrameFormat { get; }
Property Value
HasBubbleSize
Indicates whether buble size is in data labels.
public bool HasBubbleSize { get; set; }
Property Value
HasCategoryName
Indicates whether category name is in data labels.
public bool HasCategoryName { get; set; }
Property Value
HasDataLabels
Indicates whether contain dataLabels .
public bool HasDataLabels { get; }
Property Value
HasLegendKey
Indicates whether legend key is in data labels.
public bool HasLegendKey { get; set; }
Property Value
HasPercentage
Indicates whether percentage is in data labels.
public bool HasPercentage { get; set; }
Property Value
HasSeriesName
Indicates whether series name is in data labels.
public bool HasSeriesName { get; set; }
Property Value
HasTextRotation
public bool HasTextRotation { get; }
Property Value
HasValue
Indicates whether value is in data labels.
public bool HasValue { get; set; }
Property Value
HorizontalAlignType
public HorizontalAlignType HorizontalAlignType { get; set; }
Property Value
Index
public int Index { get; }
Property Value
IsAutoColor
public bool IsAutoColor { get; }
Property Value
IsAutoMode
True if background is set to automatic.
//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chartIChart chart = worksheet.Charts.Add();//Set rangechart.DataRange = worksheet.Range["B2:C6"];//Set chart typechart.ChartType = ExcelChartType.Cone3DClustered;//Set the Area's text in the chartchart.ChartTitleArea.Text = "Student Chart";//True if background is set to automaticConsole.WriteLine(chart.ChartTitleArea.IsAutoMode);//Save to fileworkbook.SaveToFile("Chart.xlsx");
public bool IsAutoMode { get; }
Property Value
IsBold
public bool IsBold { get; set; }
Property Value
IsItalic
public bool IsItalic { get; set; }
Property Value
IsResizeShapeToFitText
public bool IsResizeShapeToFitText { get; set; }
Property Value
IsShowLabelPercent
Indicates whether to show category label and value as percentage.
public bool IsShowLabelPercent { get; set; }
Property Value
IsStrikethrough
public bool IsStrikethrough { get; set; }
Property Value
IsSubscript
public bool IsSubscript { get; set; }
Property Value
IsSuperscript
public bool IsSuperscript { get; set; }
Property Value
IsTextWrapped
public bool IsTextWrapped { get; set; }
Property Value
IsTrend
Indicates if current text assign to trend object.
public bool IsTrend { get; set; }
Property Value
KnownColor
public ExcelColors KnownColor { get; set; }
Property Value
NumberFormat
Gets or sets number format for the text area.
public string NumberFormat { get; set; }
Property Value
NumberFormatIndex
Gets index to the number format. Read-only.
public int NumberFormatIndex { get; }
Property Value
OColor
Returns textarea's color object. Read-only.
public OColor OColor { get; }
Property Value
ParagraphType
public ChartParagraphType ParagraphType { get; set; }
Property Value
Parent
public object Parent { get; }
Property Value
ParentWorkbook
public XlsWorkbook ParentWorkbook { get; }
Property Value
Position
Represents data labels position.
public DataLabelPositionType Position { get; set; }
Property Value
ShowLeaderLines
Indicates whether Leader Lines is in data labels.
//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chart and set rangeChart chart = worksheet.Charts.Add();chart.DataRange = worksheet.Range["A1:C2"];//Set chart typechart.ChartType = ExcelChartType.Pie;//Get the chart serieIChartSerie serie = chart.Series[0];//Get serie data labelsIChartDataLabels dataLabels = serie.DataPoints.DefaultDataPoint.DataLabels;//Set the data label to show the leader linesdataLabels.HasValue = true;dataLabels.Position = DataLabelPositionType.Outside;dataLabels.ShowLeaderLines = true;//Save to fileworkbook.SaveToFile("Chart.xlsx");
[Obsolete("get and set are not implemented")]
public bool ShowLeaderLines { get; set; }
Property Value
Size
public double Size { get; set; }
Property Value
StrikethroughType
public string StrikethroughType { get; set; }
Property Value
Text
Area's text.Some items(such as legend,axis...) maybe invalid.
//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chartIChart chart = worksheet.Charts.Add();//Set rangechart.DataRange = worksheet.Range["B2:C6"];//Set chart typechart.ChartType = ExcelChartType.Cone3DClustered;//Set the Area's text in the chartchart.ChartTitleArea.Text = "Student Chart";//Save to fileworkbook.SaveToFile("Chart.xlsx");
public string Text { get; set; }
Property Value
TextRotationAngle
Text rotation angle.
//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chartIChart chart = worksheet.Charts.Add();//Set rangechart.DataRange = worksheet.Range["B2:C6"];//Set chart typechart.ChartType = ExcelChartType.Cone3DClustered;//Set the Area's text in the chartchart.ChartTitleArea.Text = "Student Chart";//Set the Text rotation anglechart.ChartTitleArea.TextRotationAngle = 30;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public int TextRotationAngle { get; set; }
Property Value
Underline
public FontUnderlineType Underline { get; set; }
Property Value
VerticalAlignment
public FontVertialAlignmentType VerticalAlignment { get; set; }
Property Value
X
public float X { get; set; }
Property Value
Y
public float Y { get; set; }
Property Value
Methods
BeginUpdate()
public void BeginUpdate()
Clone(object)
public object Clone(object parent)
Parameters
parent
object
Returns
Clone(object, Dictionary<int, int>, Dictionary<string, string>)
public object Clone(object parent, Dictionary<int, int> fontIndexes, Dictionary<string, string> dicNewSheetNames)
Parameters
parent
objectfontIndexes
Dictionary<int, int>dicNewSheetNames
Dictionary<string, string>
Returns
EndUpdate()
public void EndUpdate()
GetThemeColor(out ThemeColorType, out double)
public bool GetThemeColor(out ThemeColorType type, out double tint)
Parameters
type
ThemeColorTypetint
double
Returns
SetFont(ExcelFont)
public void SetFont(ExcelFont font)
Parameters
font
ExcelFont
SetThemeColor(ThemeColorType, double)
public void SetThemeColor(ThemeColorType type, double tint)
Parameters
type
ThemeColorTypetint
double