Table of Contents

Class XlsChartLegendArea

Namespace
Spire.Xls.Core.Spreadsheet.Charts
Assembly
Spire.XLS.dll
public class XlsChartLegendArea : XlsObject, IDisposable, IChartTextArea, IFont, IExcelApplication, IOptimizedUpdate
Inheritance
XlsChartLegendArea
Implements
Inherited Members

Properties

BackgroundMode

Display mode of the background.

public ChartBackgroundMode BackgroundMode { get; set; }

Property Value

ChartBackgroundMode

Color

Gets or sets color.

public Color Color { get; set; }

Property Value

Color

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 XlsFont Font { get; }

Property Value

XlsFont

FontName

Returns or sets the font name. Read / write string.

public string FontName { get; set; }

Property Value

string

FrameFormat

Return format of the text area. The following code illustrates the use of FrameFormat property:

//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

IChartFrameFormat

IsAutoColor

Indicates whether color has automatic color. Read-only.

public bool IsAutoColor { get; }

Property Value

bool

IsAutoMode

True if background is set to automatic.

public bool IsAutoMode { get; set; }

Property Value

bool

IsBold

True if the font is bold. Read / write Boolean.

public bool IsBold { get; set; }

Property Value

bool

IsItalic

True if the font style is italic. Read / write Boolean.

public bool IsItalic { get; set; }

Property Value

bool

IsStrikethrough

True if the font is struck through with a horizontal line. Read / write Boolean

public bool IsStrikethrough { get; set; }

Property Value

bool

IsSubscript

True if the font is formatted as subscript. False by default. Read / write Boolean.

public bool IsSubscript { get; set; }

Property Value

bool

IsSuperscript

True if the font is formatted as superscript. False by default. Read/write Boolean

public bool IsSuperscript { get; set; }

Property Value

bool

KnownColor

Returns or sets the primary color of the object.

public ExcelColors KnownColor { get; set; }

Property Value

ExcelColors

ParagraphType

public ChartParagraphType ParagraphType { get; set; }

Property Value

ChartParagraphType

Size

Returns or sets the size of the font. Read / write Variant.

public double Size { get; set; }

Property Value

double

StrikethroughType

public string StrikethroughType { get; set; }

Property Value

string

Text

Gets or sets text.

public string Text { get; set; }

Property Value

string

TextRotationAngle

Text rotation angle. between -90 and 90.

public int TextRotationAngle { get; set; }

Property Value

int

Underline

Returns or sets the type of underline applied to the font.

public FontUnderlineType Underline { get; set; }

Property Value

FontUnderlineType

VerticalAlignment

Returns or sets font vertical alignment.

public FontVertialAlignmentType VerticalAlignment { get; set; }

Property Value

FontVertialAlignmentType

Methods

BeginUpdate()

public void BeginUpdate()

EndUpdate()

public void EndUpdate()

GetThemeColor(out ThemeColorType, out double)

public bool GetThemeColor(out ThemeColorType type, out double tint)

Parameters

type ThemeColorType
tint double

Returns

bool

SetFont(ExcelFont)

public void SetFont(ExcelFont font)

Parameters

font ExcelFont

SetThemeColor(ThemeColorType, double)

public void SetThemeColor(ThemeColorType type, double tint)

Parameters

type ThemeColorType
tint double