Package org.pepstock.charba.client.items
Class LegendNode
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.items.BaseBoxItem
-
- org.pepstock.charba.client.items.BaseBoxNodeItem<Position>
-
- org.pepstock.charba.client.items.LegendNode
-
- All Implemented Interfaces:
IsArea
public final class LegendNode extends BaseBoxNodeItem<Position>
Wrapper of legend node of CHART.JS.
This is a wrapper of legend node of Chart (of CHART.JS).- Author:
- Andrea "Stock" Stocchero
-
-
Constructor Summary
Constructors Constructor Description LegendNode(ChartEnvelop<NativeObject> envelop)
Creates the item using an envelop with the native java script object which contains all properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Double>
getColumnHeights()
Returns the list of columns heights.List<Double>
getColumnWidths()
Returns the list of columns widths.List<LegendHitBoxItem>
getHitBoxes()
Returns the list of hit boxes of the legend.List<LegendLabelItem>
getItems()
Returns the list of items of the legend.List<Double>
getLineWidths()
Returns the list of line widths.boolean
isDoughnutMode()
Returns if it is in doughnut mode.boolean
isInside(BaseNativeEvent event)
Returnstrue
if the chart event is inside of this box, otherwisefalse
.-
Methods inherited from class org.pepstock.charba.client.items.BaseBoxNodeItem
getMaxHeight, getMaxWidth, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getPosition, getWeight, isActive, isFullSize
-
Methods inherited from class org.pepstock.charba.client.items.BaseBoxItem
getBottom, getHeight, getLeft, getRight, getTop, getWidth
-
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainer
checkDefaultValuesArgument, empty, getArrayValue, getElement, getIncrementalId, getNativeChart, getNativeEvent, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, isType, keys, loadNativeObject, remove, remove, setArrayValue, setArrayValue, setArrayValue, setElement, setEmptyValue, setNewIncrementalId, setNewIncrementalId, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
-
-
-
Constructor Detail
-
LegendNode
public LegendNode(ChartEnvelop<NativeObject> envelop)
Creates the item using an envelop with the native java script object which contains all properties.- Parameters:
envelop
- envelop with the native java script object which contains all properties.
-
-
Method Detail
-
isDoughnutMode
public boolean isDoughnutMode()
Returns if it is in doughnut mode.- Returns:
true
it is in doughnut mode.
-
getLineWidths
public List<Double> getLineWidths()
Returns the list of line widths.- Returns:
- the list of line widths.
-
getColumnWidths
public List<Double> getColumnWidths()
Returns the list of columns widths.- Returns:
- the list of columns widths.
-
getColumnHeights
public List<Double> getColumnHeights()
Returns the list of columns heights.- Returns:
- the list of columns heights.
-
getHitBoxes
public List<LegendHitBoxItem> getHitBoxes()
Returns the list of hit boxes of the legend.- Returns:
- the list of hit boxes of the legend.
-
getItems
public List<LegendLabelItem> getItems()
Returns the list of items of the legend.- Returns:
- the list of items of the legend.
-
isInside
public boolean isInside(BaseNativeEvent event)
Description copied from class:BaseBoxItem
Returnstrue
if the chart event is inside of this box, otherwisefalse
.- Overrides:
isInside
in classBaseBoxItem
- Parameters:
event
- event to check if inside the box- Returns:
true
if the chart event is inside of this box, otherwisefalse
-
-