com.supermap.mapping.imChart
Class ChartLegend
- java.lang.Object
-
- com.supermap.mapping.imChart.ChartLegend
-
public class ChartLegend extends java.lang.ObjectThe ChartLegend Class.
-
-
Field Summary
Fields Modifier and Type Field and Description static intBOTTOMCenter Bottomstatic intBOTTOMLEFTBottom Leftstatic intBOTTOMRIGHTBottom Rightstatic intLEFTCenter Rightstatic intRIGHTCenter Leftstatic intTOPCenter Topstatic intTOPLEFTTop Leftstatic intTOPRIGHTTop Right
-
Constructor Summary
Constructors Constructor and Description ChartLegend(android.content.Context context, ChartView chart)The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voiddispose()Disposes resources.booleangetVisible()Gets whether to display the legend.voidsetAlignment(int alignment)Sets the alignment of the legend relative to the chart.voidsetBackGroundColor(int color)Sets the legend background color.voidsetFontColor(int color)Sets the legend font color.voidsetFontSize(int size)Sets the legend font size.voidsetOrient(boolean bOrient)Sets whether or not to arrange the legend vertically.voidsetVisible(boolean bVisible)Sets whether to display the legend.voidupdata()Update the legend.
-
-
-
Field Detail
-
BOTTOMLEFT
public static final int BOTTOMLEFT
Bottom Left- See Also:
- Constant Field Values
-
BOTTOM
public static final int BOTTOM
Center Bottom- See Also:
- Constant Field Values
-
BOTTOMRIGHT
public static final int BOTTOMRIGHT
Bottom Right- See Also:
- Constant Field Values
-
LEFT
public static final int LEFT
Center Right- See Also:
- Constant Field Values
-
RIGHT
public static final int RIGHT
Center Left- See Also:
- Constant Field Values
-
TOPLEFT
public static final int TOPLEFT
Top Left- See Also:
- Constant Field Values
-
TOP
public static final int TOP
Center Top- See Also:
- Constant Field Values
-
TOPRIGHT
public static final int TOPRIGHT
Top Right- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ChartLegend
public ChartLegend(android.content.Context context, ChartView chart)The constructor.- Parameters:
context- Application context.chart- The chart associated with the legend.
-
-
Method Detail
-
setVisible
public void setVisible(boolean bVisible)
Sets whether to display the legend.- Parameters:
bVisible- Whether to display a legend, true for a legend, and false for a hidden legend.
-
getVisible
public boolean getVisible()
Gets whether to display the legend.- Returns:
- Whether to display a legend, true for a legend, and false for a hidden legend.
-
setOrient
public void setOrient(boolean bOrient)
Sets whether or not to arrange the legend vertically. If set to true, the legend is vertically aligned; if set to false, the legend is displayed horizontally. The legend is vertically arranged by default.- Parameters:
bOrient- Whether the vertical arrangement of the legend, true, that the vertical arrangement of the legend, false that the horizontal display legend.
-
setFontSize
public void setFontSize(int size)
Sets the legend font size.- Parameters:
size- The size font of legend.
-
setBackGroundColor
public void setBackGroundColor(int color)
Sets the legend background color.- Parameters:
color- The legend background color.
-
setFontColor
public void setFontColor(int color)
Sets the legend font color.- Parameters:
color- The legend font color.
-
setAlignment
public void setAlignment(int alignment)
Sets the alignment of the legend relative to the chart.0: bottom-left alignment; 1: bottom alignment; 2: bottom-right alignment; 3: left alignment; 4: right alignment; 5: upper left alignment; 6: upper alignment; 7: upper right alignment
- Parameters:
alignment- Legend Alignment
-
updata
public void updata()
Update the legend.You need to update the properties after you change them.
-
dispose
public void dispose()
Disposes resources.
-
-