Class Legend
java.lang.Object
software.xdev.chartjs.model.options.Legend
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected Booleanprotected Booleanprotected LegendLabelsprotected Integerprotected Integerprotected JavaScriptFunctionprotected JavaScriptFunctionprotected JavaScriptFunctionprotected Legend.Positionprotected Booleanprotected Booleanprotected Stringprotected LegendTitle -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAlign()getRtl()getTitle()Default 'center'.setDisplay(Boolean display) DefaulttruesetFullSize(Boolean fullSize) DefaulttruesetLabels(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) Defaultfalsetruefor 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
DefaulttrueIs 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
DefaulttrueMarks 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
DefaultfalseLegend will show datasets in reverse order
-
getLabels
- See Also:
-
setLabels
Default-See the Legend Label Configuration section below.
-
getRtl
- See Also:
-
setRtl
truefor 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:
-