Class Legend
java.lang.Object
software.xdev.chartjs.model.options.Legend
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
protected Boolean
protected Boolean
protected LegendLabels
protected Integer
protected Integer
protected JavaScriptFunction
protected JavaScriptFunction
protected JavaScriptFunction
protected Legend.Position
protected Boolean
protected Boolean
protected String
protected LegendTitle
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAlign()
getRtl()
getTitle()
Default 'center'.setDisplay
(Boolean display) Defaulttrue
setFullSize
(Boolean fullSize) Defaulttrue
setLabels
(LegendLabels labels) Default-
setMaxHeight
(Integer maxHeight) Maximum height of the legend, in pixelssetMaxWidth
(Integer maxWidth) Maximum width of the legend, in pixelssetOnClick
(JavaScriptFunction onClick) A callback that is called when a click is registered on top of a label itemsetOnHover
(JavaScriptFunction onHover) A callback that is called when a 'mousemove' event is registered on top of a label itemsetOnLeave
(JavaScriptFunction onLeave) A callback that is called when a 'mousemove' event is registered outside of a previously hovered label itemsetPosition
(Legend.Position position) Default'top'
setReverse
(Boolean reverse) Defaultfalse
true
for rendering the legends from right to leftsetTextDirection
(String textDirection) This will force the text direction 'rtl' or 'ltr' on the canvas for rendering the legend, regardless of the css specified on the canvassetTitle
(LegendTitle title)
-
Field Details
-
display
-
position
-
align
-
maxHeight
-
maxWidth
-
fullSize
-
onClick
-
onHover
-
onLeave
-
reverse
-
labels
-
rtl
-
textDirection
-
title
-
-
Constructor Details
-
Legend
public Legend()
-
-
Method Details
-
getDisplay
- See Also:
-
setDisplay
Defaulttrue
Is the legend displayed
-
getPosition
- See Also:
-
setPosition
Default'top'
Position of the legend. Options are 'top' or 'bottom'
-
getAlign
- See Also:
-
setAlign
Default 'center'.Alignment of the legend
-
getMaxHeight
- See Also:
-
setMaxHeight
Maximum height of the legend, in pixels -
getMaxWidth
- See Also:
-
setMaxWidth
Maximum width of the legend, in pixels -
getFullSize
- See Also:
-
setFullSize
Defaulttrue
Marks that this box should take the full width of the canvas (pushing down other boxes)
-
getOnClick
- See Also:
-
setOnClick
A callback that is called when a click is registered on top of a label item -
getOnHover
- See Also:
-
setOnHover
A callback that is called when a 'mousemove' event is registered on top of a label item -
getOnLeave
- See Also:
-
setOnLeave
A callback that is called when a 'mousemove' event is registered outside of a previously hovered label item -
getReverse
- See Also:
-
setReverse
Defaultfalse
Legend will show datasets in reverse order
-
getLabels
- See Also:
-
setLabels
Default-
See the Legend Label Configuration section below.
-
getRtl
- See Also:
-
setRtl
true
for rendering the legends from right to left -
getTextDirection
- See Also:
-
setTextDirection
This will force the text direction 'rtl' or 'ltr' on the canvas for rendering the legend, regardless of the css specified on the canvas -
getTitle
- See Also:
-
setTitle
- See Also:
-