public final class TreeMapDataset extends HoverFlexDataset
Dataset.CanvasObjectProperty, Dataset.CommonProperty
Modifier and Type | Field and Description |
---|---|
static org.pepstock.charba.client.treemap.TreeMapDataset.DataPointFactory |
DATAPOINTS_FACTORY
Factory to create
TreeMapDataPoint s. |
static int |
DEFAULT_BORDER_WIDTH
Default border width, 0.
|
static String |
DEFAULT_COLOR
Default color,
HtmlColor.TRANSPARENT |
static CapStyle |
DEFAULT_DIVIDER_CAP_STYLE
Default divider capstyle,
CapStyle.BUTT |
static String |
DEFAULT_DIVIDER_COLOR
Default divider color,
HtmlColor.BLACK |
static double |
DEFAULT_DIVIDER_DASH_OFFSET
Default divider dash offset, 0.0.
|
static int |
DEFAULT_DIVIDER_WIDTH
Default divider width, 1.
|
static boolean |
DEFAULT_GROUP_DIVIDER
Default group dividers, false.
|
static boolean |
DEFAULT_GROUP_LABELS
Default group labels, true.
|
static boolean |
DEFAULT_RTL
Default right-to-left, false.
|
static double |
DEFAULT_SPACING
Default spacing, 0.5.
|
DEFAULT_HIDDEN, DEFAULT_NORMALIZED, DEFAULT_PARSING
Constructor and Description |
---|
TreeMapDataset()
Creates a data set.
It uses the global options has default. |
TreeMapDataset(IsDefaultOptions defaultValues)
Creates a data set setting the defaults value.
|
Modifier and Type | Method and Description |
---|---|
List<IsColor> |
getColor()
Returns the color of the rectangle.
|
List<String> |
getColorAsString()
Returns the color of the rectangle.
|
ColorCallback<DatasetContext> |
getColorCallback()
Returns the color callback, if set, otherwise
null . |
List<Double> |
getData(boolean binding)
Throws an exception because not available.
|
List<TreeMapDataPoint> |
getDataPoints()
Returns the treemap data property of a dataset for a chart is specified as an array of treemap data points
|
protected int |
getDefaultBorderWidth()
Returns the default border width value based on type of chart.
|
CapStyle |
getDividerCapStyle()
Returns how the end points of every line are drawn.
|
List<IsColor> |
getDividerColor()
Returns the divider color of the rectangle.
|
List<String> |
getDividerColorAsString()
Returns the divider color of the rectangle.
|
List<Dash> |
getDividerDash()
Returns the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern.
|
double |
getDividerDashOffset()
Returns the line dash pattern offset of the divider.
|
List<Integer> |
getDividerWidth()
Returns the width of the divider line in pixels.
|
IsFont |
getFont()
Returns the the font object.
|
Set<Key> |
getGroups()
Returns the the keys of the object to use to group the values from a tree object.
It's needed ONLY when tree data is set by a list of objects. |
Set<String> |
getGroupsAsString()
Returns the the keys of the object to use to group the values from a tree object.
It's needed ONLY when tree data is set by a list of objects. |
List<IsColor> |
getHoverColor()
Returns the hover color of the rectangle.
|
List<String> |
getHoverColorAsString()
Returns the hover color of the rectangle.
|
ColorCallback<DatasetContext> |
getHoverColorCallback()
Returns the hover color callback, if set, otherwise
null . |
IsFont |
getHoverFont()
Returns the the font object when hovered.
|
Key |
getKey()
Returns the the key of the object to use to get data value from a tree object.
It's needed ONLY when tree data is set by a list of objects. |
String |
getKeyAsString()
Returns the the key of the object to use to get data value from a tree object.
It's needed ONLY when tree data is set by a list of objects. |
double |
getSpacing()
Returns the fixed spacing among rectangles.
|
List<Double> |
getTree()
Returns the tree data property of a data set for a chart is specified as a list of numbers.
|
List<Double> |
getTree(boolean binding)
Returns the tree data property of a data set for a chart is specified as an list of numbers.
|
<T extends NativeObjectContainer> |
getTreeObjects(NativeObjectContainerFactory<T> factory)
Returns the tree data property of a data set for a chart is specified as a list of objects.
|
<T extends NativeObjectContainer> |
getTreeObjects(NativeObjectContainerFactory<T> factory,
boolean binding)
Returns the tree data property of a data set for a chart is specified as an list of objects.
|
boolean |
isGroupDividers()
If
false , the divider between groups are not drawn. |
boolean |
isGroupLabels()
If
false , the labels groups are not drawn. |
boolean |
isRtl()
Returns
true for rendering the rectangles from right to left. |
void |
setColor(ColorCallback<DatasetContext> colorCallback)
Sets the color callback.
|
void |
setColor(IsColor... color)
Sets the color of the rectangle.
|
void |
setColor(NativeCallback colorCallback)
Sets the color callback.
|
void |
setColor(String... color)
Sets the color of the rectangle.
|
void |
setData(double... values)
Throws an exception because not available.
|
void |
setData(List<Double> values)
Throws an exception because not available.
|
void |
setDividerCapStyle(CapStyle dividerCapStyle)
Sets how the end points of every line are drawn.
|
void |
setDividerColor(IsColor... dividerColor)
Sets the divider color of the rectangle.
|
void |
setDividerColor(String... dividerColor)
Sets the divider color of the rectangle.
|
void |
setDividerDash(Dash... dividerDash)
Sets the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern.
|
void |
setDividerDashOffset(double dividerDashOffset)
Sets the line dash pattern offset of the divider.
|
void |
setDividerWidth(int... dividerWidth)
Sets the width of the divider line in pixels.
|
void |
setGroupDividers(boolean groupDivider)
If
false , the divider between groups are not drawn. |
void |
setGroupLabels(boolean groupLabels)
If
false , the labels groups are not drawn. |
void |
setGroups(Key... groups)
Sets the the keys of the object to use to group the values from a tree object.
It's needed ONLY when tree data is set by a list of objects. |
void |
setGroups(Set<Key> groups)
Sets the the keys of the object to use to group the values from a tree object.
It's needed ONLY when tree data is set by a list of objects. |
void |
setGroups(String... groups)
Sets the the keys of the object to use to group the values from a tree object.
It's needed ONLY when tree data is set by a list of objects. |
void |
setHoverColor(ColorCallback<DatasetContext> hoverColorCallback)
Sets the hover color callback.
|
void |
setHoverColor(IsColor... hoverColor)
Sets the hover color of the rectangle.
|
void |
setHoverColor(NativeCallback hoverColorCallback)
Sets the hover color callback.
|
void |
setHoverColor(String... hoverColor)
Sets the hover color of the rectangle.
|
void |
setKey(Key key)
Sets the the key of the object to use to get data value from a tree object.
It's needed ONLY when tree data is set by a list of objects. |
void |
setKey(String key)
Sets the the key of the object to use to get data value from a tree object.
It's needed ONLY when tree data is set by a list of objects. |
void |
setRtl(boolean rtl)
Sets
true for rendering the rectangles from right to left. |
void |
setSpacing(double spacing)
Sets the fixed spacing among rectangles.
|
void |
setTree(double... values)
Sets the tree data property of a data set for a chart is specified as an array of numbers.
|
void |
setTree(List<Double> values)
Sets the tree data property of a data set for a chart is specified as a list of numbers.
|
<T extends NativeObjectContainer> |
setTreeObjects(T[] values)
Sets the tree data property of a data set for a chart is specified as an array of objects.
|
<T extends NativeObjectContainer> |
setTreeObjetcs(List<T> values)
Sets the tree data property of a data set for a chart is specified as a list of objects.
|
getBackgroundColor, getBackgroundColorAsGradient, getBackgroundColorAsPatterns, getBackgroundColorAsString, getBorderColor, getBorderColorAsGradient, getBorderColorAsString, getBorderWidth, getColors, getHoverBackgroundColor, getHoverBackgroundColorAsGradient, getHoverBackgroundColorAsPatterns, getHoverBackgroundColorAsString, getHoverBorderColor, getHoverBorderColorAsGradient, getHoverBorderColorAsString, getHoverBorderWidth, getWidths, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBorderColor, setBorderColor, setBorderColor, setBorderWidth, setColors, setColors, setHoverBackgroundColor, setHoverBackgroundColor, setHoverBackgroundColor, setHoverBackgroundColor, setHoverBorderColor, setHoverBorderColor, setHoverBorderColor, setHoverBorderWidth, setWidths
createContext, getAnimationContainer, getBackgroundColorCallback, getBorderColorCallback, getClip, getClipAsObject, getData, getDataCount, getDataset, getDataType, getDefaultBackgroundColorAsString, getDefaultBorderColorAsString, getDefaultHoverBackgroundColorAsString, getDefaultHoverBorderColorAsString, getDefaultHoverBorderWidth, getDefaultValues, getHoverBackgroundColorCallback, getHoverBorderColorCallback, getId, getLabel, getOptions, getOptions, getScope, getType, getTypedDataset, hasOptions, invokeColorCallback, isClip, isHidden, isNormalized, isParsing, removeOptions, setBackgroundColor, setBackgroundColor, setBorderColor, setBorderColor, setClip, setClip, setClip, setHidden, setHoverBackgroundColor, setHoverBackgroundColor, setHoverBorderColor, setHoverBorderColor, setLabel, setNormalized, setOptions, setOptions, setParsing
checkAndAddToParent, getChildKey, getParentNode, getRootNode, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAnimation, getAnimations, getTransitions, isAnimationEnabled, setAnimationEnabled
extractScope
public static final org.pepstock.charba.client.treemap.TreeMapDataset.DataPointFactory DATAPOINTS_FACTORY
TreeMapDataPoint
s.public static final int DEFAULT_BORDER_WIDTH
public static final String DEFAULT_COLOR
HtmlColor.TRANSPARENT
public static final CapStyle DEFAULT_DIVIDER_CAP_STYLE
CapStyle.BUTT
public static final String DEFAULT_DIVIDER_COLOR
HtmlColor.BLACK
public static final double DEFAULT_DIVIDER_DASH_OFFSET
public static final int DEFAULT_DIVIDER_WIDTH
public static final boolean DEFAULT_GROUP_DIVIDER
public static final boolean DEFAULT_GROUP_LABELS
public static final double DEFAULT_SPACING
public static final boolean DEFAULT_RTL
public TreeMapDataset()
public TreeMapDataset(IsDefaultOptions defaultValues)
defaultValues
- default optionsprotected int getDefaultBorderWidth()
Dataset
getDefaultBorderWidth
in class Dataset
public IsFont getFont()
public IsFont getHoverFont()
public List<TreeMapDataPoint> getDataPoints()
public void setTree(double... values)
values
- an array of numberspublic void setTree(List<Double> values)
values
- list of numbers.public List<Double> getTree()
public List<Double> getTree(boolean binding)
binding
- if true
binds the new array list in the containerpublic <T extends NativeObjectContainer> void setTreeObjects(T[] values)
T
- type of tree objectsvalues
- an array of objectspublic <T extends NativeObjectContainer> void setTreeObjetcs(List<T> values)
T
- type of tree objectsvalues
- list of objects.public <T extends NativeObjectContainer> List<T> getTreeObjects(NativeObjectContainerFactory<T> factory)
T
- type of tree objectsfactory
- instance of factory to create the native objectpublic <T extends NativeObjectContainer> List<T> getTreeObjects(NativeObjectContainerFactory<T> factory, boolean binding)
T
- type of tree objectsfactory
- instance of factory to create the native objectbinding
- if true
binds the new array list in the containerpublic void setKey(String key)
key
- the the key of the object to use to get data value from a tree objectpublic void setKey(Key key)
key
- the the key of the object to use to get data value from a tree objectpublic String getKeyAsString()
public Key getKey()
public void setGroups(String... groups)
groups
- the the keys of the object to use to group the values from a tree objectpublic void setGroups(Key... groups)
groups
- the the keys of the object to use to group the values from a tree objectpublic void setGroups(Set<Key> groups)
groups
- the the keys of the object to use to group the values from a tree objectpublic Set<String> getGroupsAsString()
public Set<Key> getGroups()
public void setColor(IsColor... color)
color
- the color of the rectanglepublic void setColor(String... color)
color
- the color of the rectanglepublic List<String> getColorAsString()
public List<IsColor> getColor()
public void setHoverColor(IsColor... hoverColor)
hoverColor
- the hover color of the rectanglepublic void setHoverColor(String... hoverColor)
hoverColor
- the hover color of the rectanglepublic List<String> getHoverColorAsString()
public List<IsColor> getHoverColor()
public void setDividerCapStyle(CapStyle dividerCapStyle)
dividerCapStyle
- how the end points of every line are drawn.public CapStyle getDividerCapStyle()
public void setDividerColor(IsColor... dividerColor)
dividerColor
- the divider color of the rectanglepublic void setDividerColor(String... dividerColor)
dividerColor
- the divider color of the rectanglepublic List<String> getDividerColorAsString()
public List<IsColor> getDividerColor()
public void setDividerDash(Dash... dividerDash)
dividerDash
- the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern.public List<Dash> getDividerDash()
public void setDividerDashOffset(double dividerDashOffset)
dividerDashOffset
- the line dash pattern offset of the dividerpublic double getDividerDashOffset()
public void setDividerWidth(int... dividerWidth)
dividerWidth
- the width of the divider line in pixels.public List<Integer> getDividerWidth()
public void setGroupDividers(boolean groupDivider)
false
, the divider between groups are not drawn.groupDivider
- if false
, the divider between groups are not drawnpublic boolean isGroupDividers()
false
, the divider between groups are not drawn.false
, the divider between groups are not drawnpublic void setGroupLabels(boolean groupLabels)
false
, the labels groups are not drawn.groupLabels
- if false
, the labels groups are not drawnpublic boolean isGroupLabels()
false
, the labels groups are not drawn.false
, the labels groups are not drawnpublic void setSpacing(double spacing)
spacing
- the fixed spacing among rectanglespublic double getSpacing()
public void setRtl(boolean rtl)
true
for rendering the rectangles from right to left.rtl
- true
for rendering the rectangles from right to leftpublic boolean isRtl()
true
for rendering the rectangles from right to left.true
for rendering the rectangles from right to left.public ColorCallback<DatasetContext> getColorCallback()
null
.null
.public void setColor(ColorCallback<DatasetContext> colorCallback)
colorCallback
- the color callback.public void setColor(NativeCallback colorCallback)
colorCallback
- the color callback.public ColorCallback<DatasetContext> getHoverColorCallback()
null
.null
.public void setHoverColor(ColorCallback<DatasetContext> hoverColorCallback)
hoverColorCallback
- the hover color callback.public void setHoverColor(NativeCallback hoverColorCallback)
hoverColorCallback
- the color callback.public void setData(double... values)