com.supermap.mapping.imChart
Class ChartLegend
- java.lang.Object
-
- com.supermap.mapping.imChart.ChartLegend
-
public class ChartLegend extends java.lang.Object
The ChartLegend Class.
-
-
Field Summary
Fields Modifier and Type Field and Description static int
BOTTOM
Center Bottomstatic int
BOTTOMLEFT
Bottom Leftstatic int
BOTTOMRIGHT
Bottom Rightstatic int
LEFT
Center Rightstatic int
RIGHT
Center Leftstatic int
TOP
Center Topstatic int
TOPLEFT
Top Leftstatic int
TOPRIGHT
Top 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 void
dispose()
Disposes resources.boolean
getVisible()
Gets whether to display the legend.void
setAlignment(int alignment)
Sets the alignment of the legend relative to the chart.void
setBackGroundColor(int color)
Sets the legend background color.void
setFontColor(int color)
Sets the legend font color.void
setFontSize(int size)
Sets the legend font size.void
setOrient(boolean bOrient)
Sets whether or not to arrange the legend vertically.void
setVisible(boolean bVisible)
Sets whether to display the legend.void
updata()
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.
-
-