The NChartLegend class provides methods to display the legend of the chart. More...
Public Member Functions | |
NChartFont | getFont () |
Font of the legend's text. | |
void | setFont (NChartFont font) |
For details see getFont(). | |
int | getTextColor () |
Color of the legend's text. | |
void | setTextColor (int textColor) |
For details see getTextColor(). | |
NChartLineBreakMode | getLineBreakMode () |
Line break mode of the legend's text. | |
NChartLabel | getFooter () |
Label that is placed on the bottom of the legend. More... | |
void | setFooter (NChartLabel footer) |
For details see getFooter(). | |
NChartLabel | getHeader () |
Label that is placed on the top of the legend. More... | |
void | setHeader (NChartLabel header) |
For details see getHeader(). | |
NChartLegendBlockAlignment | getBlockAlignment () |
Alignment of the legend. More... | |
void | setBlockAlignment (NChartLegendBlockAlignment blockAlignment) |
For details see getBlockAlignment(). | |
NChartLegendContentAlignment | getContentAlignment () |
Alignment of legend's content in legend's area. More... | |
void | setContentAlignment (NChartLegendContentAlignment contentAlignment) |
For details see getContentAlignment(). | |
int | getColumnCount () |
Number of columns in legend. More... | |
void | setColumnCount (int columnCount) |
For details see getColumnCount(). | |
boolean | shouldAutodetectColumnCount () |
Flag determining if columnCount should be detected automatically to ensure good-looking legend (true) or not (false). More... | |
void | setShouldAutodetectColumnCount (boolean shouldAutodetectColumnCount) |
For details see shouldAutodetectColumnCount(). | |
float | getMaxSize () |
Maximal size of legend in pixels. More... | |
void | setMaxSize (float maxSize) |
For details see getMaxSize(). | |
float | getMinimalEntriesPadding () |
Minimal padding between entries in pixels. More... | |
void | setMinimalEntriesPadding (float minimalEntriesPadding) |
For details see getMinimalEntriesPadding(). | |
NChartMargin | getScrollerPadding () |
Padding inside the scroller. | |
void | setScrollerPadding (NChartMargin scrollerPadding) |
For details see getScrollerPadding(). | |
NChartLegendOrientation | getOrientation () |
Orientation of the legend. More... | |
void | setOrientation (NChartLegendOrientation orientation) |
For details see getOrientation(). | |
PointF | getOrigin () |
Origin of the legend. More... | |
void | setOrigin (PointF origin) |
For details see getOrigin(). | |
int | getScrollBarColor () |
Color of the legend's scrollbar. | |
void | setScrollBarColor (int scrollBarColor) |
For details see getScrollBarColor(). | |
void | setHandlerColors (int normal, int pushed) |
Set color for legend's handler. More... | |
void | setHandlerImages (Bitmap normal, Bitmap pushed) |
Set images for legend's handler. More... | |
RectF | getFrame () |
Frame of the legend in the view's coordinate system. More... | |
int | handlerNormalColor () |
Get color of legend's handler normal state. | |
int | handlerPushedColor () |
Get color of legend's handler pushed state. | |
boolean | isUserInteractionsEnabled () |
Flag determining if user interactions in the legend (scrolling, etc.) are enabled (true) or disabled (false). More... | |
void | setUserInteractionsEnabled (boolean userInteractionsEnabled) |
For details see isUserInteractionsEnabled(). | |
NChartLegendLabelPosition | getLabelPosition () |
Position of the legend labels related to the legend markers. More... | |
void | setLabelPosition (NChartLegendLabelPosition labelPosition) |
For details see getLabelPosition(). | |
NChartLegendDelegate | getDelegate () |
Delegate of the legend. | |
void | setDelegate (NChartLegendDelegate delegate) |
For details see getDelegate(). | |
Public Member Functions inherited from com.nchart3d.NChart.NChartPlaced | |
NChartBrush | getBackground () |
Brush filling the background of the text container. More... | |
void | setBackground (NChartBrush background) |
For details see getBackground(). | |
int | getBorderColor () |
Color of the border that is drawn around the text container. | |
void | setBorderColor (int borderColor) |
For details see getBorderColor(). | |
float | getBorderRadius () |
Corner rounding radius (in pixels) of the border that is drawn around the text container. | |
void | setBorderRadius (float borderRadius) |
For details see getBorderRadius(). | |
float | getBorderThickness () |
Thickness of the border (in pixels) that is drawn around the text container. | |
void | setBorderThickness (float borderThickness) |
For details see getBorderThickness(). | |
NChartMargin | getMargin () |
Margin of the text container in pixels (spacing from the bounds of the enclosing area). | |
void | setMargin (NChartMargin margin) |
For details see getMargin(). | |
NChartMargin | getPadding () |
Padding of the text container in pixels (spacing to sub-areas). | |
void | setPadding (NChartMargin padding) |
For details see getPadding(). | |
float | getOpacity () |
Opacity of the text container. More... | |
void | setOpacity (float opacity) |
For details see getOpacity(). | |
Public Member Functions inherited from com.nchart3d.NChart.NChartObject | |
boolean | isVisible () |
Flag that determines if the object is visible or not. More... | |
void | setVisible (boolean visible) |
For details see isVisible(). | |
NChart | getChart () |
Chart the object belongs to. More... | |
Detailed Description
The NChartLegend class provides methods to display the legend of the chart.
Member Function Documentation
|
inline |
Alignment of the legend.
Please note, that if alignment is NChartLegendBlockAlignment#Left, NChartLegendBlockAlignment#Right, NChartLegendBlockAlignment#Bottom or NChartLegendBlockAlignment#Top, the border radius is ignored (assumed to be 0).
- See also
- NChartLegendBlockAlignment
|
inline |
Number of columns in legend.
If 0 or less than 0, entries are aligned in lines with no columns. The default value is 0.
|
inline |
Alignment of legend's content in legend's area.
The default value is NChartLegendContentAlignment#Justified.
- See also
- NChartLegendContentAlignment
|
inline |
|
inline |
Frame of the legend in the view's coordinate system.
The frame is a rect fully enclosing the entire legend. This rect is calculated during updateData
call when the chat lays out its elements. This rect may change interactively when the legend is dragged by its handler.
|
inline |
|
inline |
Position of the legend labels related to the legend markers.
The default value is NChartLegendLabelPosition.Right.
|
inline |
Maximal size of legend in pixels.
The default value is 200. If the legend's block alignment is so that the legend grows vertically, it is interpreted as maximal height, if the legend grows horizontally – as maximal width.
To be more precise, the mapping works as follows
- by NChartLegendBlockAlignment#BottomLeft it is height;
- by NChartLegendBlockAlignment#BottomCenter it is height;
- by NChartLegendBlockAlignment#BottomRight it is height;
- by NChartLegendBlockAlignment#CenterLeft it is width;
- by NChartLegendBlockAlignment#CenterCenter it is ignored;
- by NChartLegendBlockAlignment#CenterRight it is width;
- by NChartLegendBlockAlignment#TopLeft it is height;
- by NChartLegendBlockAlignment#TopCenter it is height;
- by NChartLegendBlockAlignment#TopRight it is height;
- by NChartLegendBlockAlignment#Left it is width;
- by NChartLegendBlockAlignment#Right it is width;
- by NChartLegendBlockAlignment#Bottom it is height;
- by NChartLegendBlockAlignment#Top it is height.
|
inline |
Minimal padding between entries in pixels.
The default value is 10.
|
inline |
Orientation of the legend.
- See also
- NChartLegendOrientation
|
inline |
Origin of the legend.
It's a starting point that has effect only with orientation set to one of "free"-kinds.
|
inline |
Flag determining if user interactions in the legend (scrolling, etc.) are enabled (true) or disabled (false).
The default value is true.
|
inline |
Set color for legend's handler.
- Parameters
-
normal - color for normal state. pushed - color for pushed state.
|
inline |
Set images for legend's handler.
- Parameters
-
normal - image for normal state. pushed - image for pushed state.
|
inline |
Flag determining if columnCount
should be detected automatically to ensure good-looking legend (true) or not (false).
If this property is true, the value set to columnCount
takes no effect. The default value is false.
- See also
- getColumnCount()