public class Legend extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Legend.Position |
Constructor and Description |
---|
Legend() |
Modifier and Type | Method and Description |
---|---|
Boolean |
getDisplay() |
Boolean |
getFullWidth() |
LegendLabels |
getLabels() |
JavaScriptFunction |
getOnClick() |
Legend.Position |
getPosition() |
Legend |
setDisplay(Boolean display)
Default
true
Is the legend displayed |
Legend |
setFullWidth(Boolean fullWidth)
Default
true
Marks that this box should take the full width of the canvas (pushing down other boxes) |
Legend |
setLabels(LegendLabels labels)
Default
-
See the Legend Label Configuration section below. |
Legend |
setOnClick(JavaScriptFunction onClick)
Default
function(event, legendItem) {}
A callback that is called when a click is registered on top of a label item |
Legend |
setPosition(Legend.Position position)
Default
'top'
Position of the legend. |
public Boolean getDisplay()
setDisplay(Boolean)
public Legend.Position getPosition()
setPosition(Legend.Position)
public Legend setPosition(Legend.Position position)
'top'
Position of the legend. Options are 'top' or 'bottom'public Boolean getFullWidth()
setFullWidth(Boolean)
public Legend setFullWidth(Boolean fullWidth)
true
Marks that this box should take the full width of the canvas (pushing down other boxes)public JavaScriptFunction getOnClick()
setOnClick(JavaScriptFunction)
public Legend setOnClick(JavaScriptFunction onClick)
function(event, legendItem) {}
A callback that is called when a click is registered on top of a label itempublic LegendLabels getLabels()
setLabels(LegendLabels)
public Legend setLabels(LegendLabels labels)
-
See the Legend Label Configuration section below.Copyright © 2017. All rights reserved.