Namespace EasyXLS.Charts
Class ExcelChartLegend
System.Object
- All Implemented Interfaces:
IEffectDrawingObject,IFontDrawingObject
This class stores the ChartLegend information like fill settings, font settings, line settings, shadow settings, legend position,
keys arrangement direction, visibility .
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClone()Creates and returns a copy of this object.This class does not support 3D formatting.System.Drawing.ColorDeprecated.System.Drawing.ColorDeprecated.As of version 8.3, replaced byLineColorFormat.getLineColor()intDeprecated.As of version 8.3, replaced byLineStyleFormat.getDashType()intDeprecated.As of version 8.3, replaced byLineStyleFormat.getWidth()System.StringgetFont()Deprecated.As of version 8.3, replaced byFontFormat.getFont()intDeprecated.As of version 8.3, replaced byFontFormat.getFontSize()System.Drawing.ColorDeprecated.As of version 8.3, replaced byFontFormat.getForeground()intReturns the direction in which the keys are arranged inside the legend: vertically or horizontally.intReturns the position of the chart legend within the chart area.intDeprecated.As of version 8.3, replaced byFontFormat.getUnderlineStyle()boolIsBold()Deprecated.As of version 8.3, replaced byFontFormat.IsBold()boolIsItalic()Deprecated.As of version 8.3, replaced byFontFormat.IsItalic()boolIsShadow()Deprecated.As of version 8.3, replaced byShadowFormat.HasShadow()boolDeprecated.As of version 8.3, replaced byFontFormat.IsStrikethrough()boolDeprecated.As of version 8.3, replaced byFontFormat.IsSubscript()boolDeprecated.As of version 8.3, replaced byFontFormat.IsSuperscript()boolReturns the visible setting of the chart legend.voidsetBackground(System.Drawing.Color background) Deprecated.As of version 8.3, replaced byFillFormat.setBackground(Color)voidsetBold(bool isBold) Deprecated.As of version 8.3, replaced byFontFormat.setBold(bool)voidsetBorderColor(System.Drawing.Color borderColor) Deprecated.As of version 8.3, replaced byLineColorFormat.setLineColor(Color)voidsetBorderStyle(int borderStyle) Deprecated.As of version 8.3, replaced byLineStyleFormat.setDashType(System.String)voidsetBorderWeight(int borderWeight) Deprecated.As of version 8.3, replaced byLineStyleFormat.setWidth(float)voidsetFont(System.String fontName) Deprecated.As of version 8.3, replaced byFontFormat.setFont(System.String)voidsetFontSettings(System.String fontName, int fontSize, bool isBold, bool isItalic, System.Drawing.Color foreground) Deprecated.As of version 8.3, replaced byFontFormat.setFontSettings(String,int,bool,bool,Color)voidsetFontSize(int fontSize) Deprecated.As of version 8.3, replaced byFontFormat.setFontSize(float)voidsetForeground(System.Drawing.Color foreground) Deprecated.As of version 8.3, replaced byFontFormat.setForeground(Color)voidsetItalic(bool isItalic) Deprecated.As of version 8.3, replaced byFontFormat.setItalic(bool)voidsetKeysArrangementDirection(int direction) Sets the direction in which the keys will be arranged: vertical or horizontal.voidsetPlacement(int location) Sets the placement setting (position) of the chart legend within the chart area.voidsetShadow(bool isShadow) Deprecated.As of version 8.3, replaced byShadowFormat.setShadow(int)voidsetStrikethrough(bool isStrikethrough) Deprecated.As of version 8.3, replaced byFontFormat.setStrikethrough(bool)voidsetSubscript(bool isSubscript) Deprecated.As of version 8.3, replaced byFontFormat.setSubscript(bool)voidsetSuperscript(bool isSuperscript) Deprecated.As of version 8.3, replaced byFontFormat.setSuperscript(bool)voidsetUnderlineStyle(int underlineStyle) Deprecated.As of version 8.3, replaced byFontFormat.setUnderlineSettings(String,bool)voidsetVisible(bool value) Sets the visible setting of the chart legend.Methods inherited from class EasyXLS.Drawings.FontDrawingObject
getFontFormat, setFontFormatMethods inherited from class EasyXLS.Drawings.EffectDrawingObject
set3DFormatMethods inherited from class EasyXLS.Drawings.FillDrawingObject
getFillFormat, setFillFormatMethods inherited from class EasyXLS.Drawings.LineDrawingObject
getLineColorFormat, getLineStyleFormat, getShadowFormat, setLineColorFormat, setLineStyleFormat, setShadowFormatMethods inherited from class EasyXLS.Drawings.DrawingObject
getHeight, getHorizontalOffset, getRelativeHeight, getRelativeHorizontalOffset, getRelativeVerticalOffset, getRelativeWidth, getVerticalOffset, getWidth, setLeftUpperOffset, setRelativeLeftUpperOffset, setRelativeSize, setSizeMethods inherited from class System.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ExcelChartLegend
public ExcelChartLegend()Defines an instance of the excel legend.
-
-
Method Details
-
IsVisible
public bool IsVisible()Returns the visible setting of the chart legend.- Returns:
- the visible setting of the chart legend
- See Also:
-
setVisible
public void setVisible(bool value) Sets the visible setting of the chart legend.- Parameters:
value- the new visible setting of the chart legend- See Also:
-
getBorderStyle
public int getBorderStyle()Deprecated.As of version 8.3, replaced byLineStyleFormat.getDashType()Returns the border style of the chart legend. Possible values are available inChartclass.- Returns:
- the border style of the chart legend
- See Also:
-
setBorderStyle
public void setBorderStyle(int borderStyle) Deprecated.As of version 8.3, replaced byLineStyleFormat.setDashType(System.String)Sets the style of the chart legend border. Possible values are available inChartclass.- Parameters:
borderStyle- the new style of the chart legend border- See Also:
-
getBorderWeight
public int getBorderWeight()Deprecated.As of version 8.3, replaced byLineStyleFormat.getWidth()Returns the border weight of the chart legend. Possible values are available inChartclass.- Returns:
- the border weight of the chart legend
- See Also:
-
setBorderWeight
public void setBorderWeight(int borderWeight) Deprecated.As of version 8.3, replaced byLineStyleFormat.setWidth(float)Sets the weight of the chart legend border. Possible values are available inChartclass.- Parameters:
borderWeight- the new weight value of the chart legend border- See Also:
-
getBorderColor
public System.Drawing.Color getBorderColor()Deprecated.As of version 8.3, replaced byLineColorFormat.getLineColor()Returns the border color of the chart legend.- Returns:
- the border color of the chart legend
- See Also:
-
setBorderColor
public void setBorderColor(System.Drawing.Color borderColor) Deprecated.As of version 8.3, replaced byLineColorFormat.setLineColor(Color)Sets the color of the chart legend border.- Parameters:
borderColor- the new color of the chart legend border- See Also:
-
IsShadow
public bool IsShadow()Deprecated.As of version 8.3, replaced byShadowFormat.HasShadow()Returns the shadow setting of the chart legend.- Returns:
- the shadow setting of the chart legend
- See Also:
-
setShadow
public void setShadow(bool isShadow) Deprecated.As of version 8.3, replaced byShadowFormat.setShadow(int)Sets the shadow setting of the chart legend.- Parameters:
isShadow- the new shadow setting of the chart legend.- See Also:
-
getForeground
public System.Drawing.Color getForeground()Deprecated.As of version 8.3, replaced byFontFormat.getForeground()Returns the text color of the chart legend.- Returns:
- the text color of the chart legend
- See Also:
-
setForeground
public void setForeground(System.Drawing.Color foreground) Deprecated.As of version 8.3, replaced byFontFormat.setForeground(Color)Sets the foreground color of the chart legend.- Parameters:
foreground- the new color of the chart legend foreground- See Also:
-
getBackground
public System.Drawing.Color getBackground()Deprecated.As of version 8.3, replaced byFillFormat.getBackground()Returns the background color of the chart legend.- Returns:
- the chart legend's background color
-
setBackground
public void setBackground(System.Drawing.Color background) Deprecated.As of version 8.3, replaced byFillFormat.setBackground(Color)Sets the background color of the chart legend.- Parameters:
background- the new color of the legend background
-
IsStrikethrough
public bool IsStrikethrough()Deprecated.As of version 8.3, replaced byFontFormat.IsStrikethrough()Returns the strikethrough setting of the chart legend font.- Returns:
- the strikethrough setting of the chart legend font
- See Also:
-
setStrikethrough
public void setStrikethrough(bool isStrikethrough) Deprecated.As of version 8.3, replaced byFontFormat.setStrikethrough(bool)Sets the strikethrough setting of the chart legend font.- Parameters:
isStrikethrough- the new value of the strikethrough setting- See Also:
-
IsSuperscript
public bool IsSuperscript()Deprecated.As of version 8.3, replaced byFontFormat.IsSuperscript()Returns the superscript setting of the chart legend font.- Returns:
- Returns the superscript setting of the chart legend font.
- See Also:
-
setSuperscript
public void setSuperscript(bool isSuperscript) Deprecated.As of version 8.3, replaced byFontFormat.setSuperscript(bool)Sets the superscript setting of the chart legend font.- Parameters:
isSuperscript- the new superscript setting of the chart legend font- See Also:
-
IsSubscript
public bool IsSubscript()Deprecated.As of version 8.3, replaced byFontFormat.IsSubscript()Returns the subscript setting of the chart legend font.- Returns:
- the subscript setting of the chart legend font
- See Also:
-
setSubscript
public void setSubscript(bool isSubscript) Deprecated.As of version 8.3, replaced byFontFormat.setSubscript(bool)Sets the subscript setting of the chart legend font.- Parameters:
isSubscript- the new subscript setting of the chart legend font- See Also:
-
getUnderlineStyle
public int getUnderlineStyle()Deprecated.As of version 8.3, replaced byFontFormat.getUnderlineStyle()Returns the underline style of the chart legend text. Possible values are available inFontSettingsclass.- Returns:
- the underline style of the chart legend text
- See Also:
-
setUnderlineStyle
public void setUnderlineStyle(int underlineStyle) Deprecated.As of version 8.3, replaced byFontFormat.setUnderlineSettings(String,bool)Sets the underline style of the chart legend text. Possible values are available inFontSettingsclass.- Parameters:
underlineStyle- the new underline style of the chart legend- See Also:
-
getFontSize
public int getFontSize()Deprecated.As of version 8.3, replaced byFontFormat.getFontSize()Returns the size of the font used in the chart legend.- Returns:
- the size of the font used in the chart legend
- See Also:
-
setFontSize
public void setFontSize(int fontSize) Deprecated.As of version 8.3, replaced byFontFormat.setFontSize(float)Sets the size of the chart legend font.- Parameters:
fontSize- the new value of the chart legend font size.- See Also:
-
getFont
public System.String getFont()Deprecated.As of version 8.3, replaced byFontFormat.getFont()Returns the font name used in the chart legend.- Returns:
- the font name used in the chart legend
- See Also:
-
setFont
public void setFont(System.String fontName) Deprecated.As of version 8.3, replaced byFontFormat.setFont(System.String)Sets the chart legend font name.- Parameters:
fontName- the name of the new font- See Also:
-
IsBold
public bool IsBold()Deprecated.As of version 8.3, replaced byFontFormat.IsBold()Returns the bold setting of the chart legend font.- Returns:
- the bold setting of the chart legend font
- See Also:
-
setBold
public void setBold(bool isBold) Deprecated.As of version 8.3, replaced byFontFormat.setBold(bool)Sets the bold setting of the chart legend font.- Parameters:
isBold- the new value of the bold setting- See Also:
-
IsItalic
public bool IsItalic()Deprecated.As of version 8.3, replaced byFontFormat.IsItalic()Returns the italic setting of the chart legend font.- Returns:
- the italic setting of the chart legend font
- See Also:
-
setItalic
public void setItalic(bool isItalic) Deprecated.As of version 8.3, replaced byFontFormat.setItalic(bool)Sets the italic setting of the chart legend font.- Parameters:
isItalic- the new italic style of the chart area font- See Also:
-
setFontSettings
public void setFontSettings(System.String fontName, int fontSize, bool isBold, bool isItalic, System.Drawing.Color foreground) Deprecated.As of version 8.3, replaced byFontFormat.setFontSettings(String,int,bool,bool,Color)Sets the font settings.- Parameters:
fontName- the name of the fontfontSize- the size of the fontisBold- the bold option of the fontisItalic- the italic option of the fontforeground- the foreground color
-
getPlacement
public int getPlacement()Returns the position of the chart legend within the chart area. Possible values are available inChartclass.- Returns:
- the position of the chart legend within the chart area
- See Also:
-
setPlacement
public void setPlacement(int location) Sets the placement setting (position) of the chart legend within the chart area. Possible values are available inChartclass.- Parameters:
location- the new position of the chart legend.- See Also:
-
getKeysArrangementDirection
public int getKeysArrangementDirection()Returns the direction in which the keys are arranged inside the legend: vertically or horizontally. It is valid only for Office 97-2003 files. Possible values are available inChartclass.- Returns:
- the direction for keys arrangement
- See Also:
-
setKeysArrangementDirection
public void setKeysArrangementDirection(int direction) Sets the direction in which the keys will be arranged: vertical or horizontal. It is valid only for Office 97-2003 files. Possible values are available inChartclass.- Parameters:
direction- the new direction- See Also:
-
get3DFormat
This class does not support 3D formatting.- Specified by:
get3DFormatin interfaceIEffectDrawingObject- Overrides:
get3DFormatin classEffectDrawingObject- Returns:
- always return null
- See Also:
-
Clone
Creates and returns a copy of this object.- Returns:
- a clone of this instance.
-
FillFormat.getBackground()