Class MatrixDataset
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.commons.AbstractNode
-
- org.pepstock.charba.client.data.Dataset
-
- org.pepstock.charba.client.data.HoverFlexDataset
-
- org.pepstock.charba.client.matrix.MatrixDataset
-
- All Implemented Interfaces:
HasCallbackScope,HasDataset,IsDefaultAnimationContainer,IsDefaultAnimationTransition,HasAnimationOptions
public final class MatrixDataset extends HoverFlexDataset
The matrix data set allows to specify the values for showing magnitude of a phenomenon as color in two dimensions.
The variation in color may be by hue or intensity, giving obvious visual cues to the reader about how the phenomenon is clustered or varies over space.- Author:
- Andrea "Stock" Stocchero
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.pepstock.charba.client.data.Dataset
Dataset.CanvasObjectProperty, Dataset.CommonProperty
-
-
Field Summary
Fields Modifier and Type Field Description static org.pepstock.charba.client.matrix.MatrixDataset.DataPointFactoryDATAPOINTS_FACTORYFactory to createMatrixDataPoints.static intDEFAULT_BORDER_RADIUSDefault border radius, 0.static intDEFAULT_BORDER_WIDTHDefault border width, 0.static doubleDEFAULT_HEIGHTDefault height, in pixels, 20.0.static doubleDEFAULT_WIDTHDefault width, in pixels, 20.0.-
Fields inherited from class org.pepstock.charba.client.data.Dataset
DEFAULT_HIDDEN, DEFAULT_NORMALIZED, DEFAULT_PARSING
-
-
Constructor Summary
Constructors Constructor Description MatrixDataset()Creates a data set.
It uses the global options has default.MatrixDataset(IsDefaultOptions defaultValues)Creates a data set setting the defaults value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetBorderRadius()Returns the border radius (in pixels).BarBorderRadiusgetBorderRadiusAsObject()Returns the border radius (in pixels).BorderRadiusCallback<DatasetContext>getBorderRadiusCallback()Returns the callback to set the border radius (in pixels).BarBorderWidthgetBorderWidthAsObject()Returns the border width (in pixels).BarBorderWidthCallbackgetBorderWidthCallback()Returns the callback to set the border width (in pixels).List<Double>getData(boolean binding)Throws an exception because not available.List<MatrixDataPoint>getDataPoints()Returns the matrix data property of a dataset for a chart is specified as an array of matrix data pointsList<MatrixDataPoint>getDataPoints(boolean binding)Returns the matrix data property of a dataset for a chart is specified as an array of matrix data pointsprotected intgetDefaultBorderWidth()Returns the default border width value based on type of chart.doublegetHeight()Returns the height of matrix element in pixels.SizeCallbackgetHeightCallback()Returns the height callback to set the height of matrix element in pixels.BarBorderWidthgetHoverBorderWidthAsObject()Returns the border width (in pixels), when hovered.BarBorderWidthCallbackgetHoverBorderWidthCallback()Returns the callback to set the border width (in pixels), when hovered.doublegetWidth()Returns the width of matrix element in pixels.SizeCallbackgetWidthCallback()Returns the width callback to set the width of matrix element in pixels.AnchorgetXAnchor()Returns the anchor point on X orientation of matrix element.AnchorgetYAnchor()Returns the anchor point on Y orientation of matrix element.voidsetBorderRadius(int borderRadius)Sets the border radius (in pixels).voidsetBorderRadius(BorderRadiusCallback<DatasetContext> borderRadiusCallback)Sets the callback to set the border radius (in pixels).voidsetBorderRadius(NativeCallback borderRadiusCallback)Sets the callback to set the border radius (in pixels).voidsetBorderRadius(BarBorderRadius borderRadius)Sets the border radius (in pixels).voidsetBorderWidth(BarBorderWidthCallback borderWidthCallback)Sets the callback to set the border width (in pixels).voidsetBorderWidth(NativeCallback borderWidthCallback)Sets the callback to set the border width (in pixels).voidsetBorderWidth(BarBorderWidth borderWidth)Sets the border width (in pixels).voidsetData(double... values)Throws an exception because not available.voidsetData(List<Double> values)Throws an exception because not available.voidsetDataPoints(List<MatrixDataPoint> datapoints)Sets the data property of a data set for a chart is specified as an array of data points.voidsetDataPoints(MatrixDataPoint... datapoints)Sets the data property of a data set for a chart is specified as an array of data points.voidsetHeight(double height)Sets the height of matrix element in pixels.voidsetHeight(NativeCallback heightCallback)Sets the height callback to set the height of matrix element in pixels.voidsetHeight(SizeCallback heightCallback)Sets the height callback to set the height of matrix element in pixels.voidsetHoverBorderWidth(BarBorderWidthCallback hoverBorderWidthCallback)Sets the callback to set the border width (in pixels), when hovered.voidsetHoverBorderWidth(NativeCallback hoverBorderWidthCallback)Sets the callback to set the border width (in pixels), when hovered.voidsetHoverBorderWidth(BarBorderWidth hoverBorderWidth)Sets the border width (in pixels), when hovered.voidsetWidth(double width)Sets the width of matrix element in pixels.voidsetWidth(NativeCallback widthCallback)Sets the width callback to set the width of matrix element in pixels.voidsetWidth(SizeCallback widthCallback)Sets the width callback to set the width of matrix element in pixels.voidsetXAnchor(Anchor anchor)Sets the anchor point on X orientation of matrix element.voidsetYAnchor(Anchor anchor)Sets the anchor point on Y orientation of matrix element.-
Methods inherited from class org.pepstock.charba.client.data.HoverFlexDataset
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
-
Methods inherited from class org.pepstock.charba.client.data.Dataset
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
-
Methods inherited from class org.pepstock.charba.client.commons.AbstractNode
checkAndAddToParent, getChildKey, getParentNode, getRootNode, getUpdateListener, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setUpdateListener, setValueAndAddToParent, 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
-
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainer
checkAndGetColor, 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, 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, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pepstock.charba.client.options.HasAnimationOptions
getAnimation, getAnimations, getTransitions, isAnimationEnabled, setAnimationEnabled
-
-
-
-
Field Detail
-
DATAPOINTS_FACTORY
public static final org.pepstock.charba.client.matrix.MatrixDataset.DataPointFactory DATAPOINTS_FACTORY
Factory to createMatrixDataPoints.
-
DEFAULT_BORDER_WIDTH
public static final int DEFAULT_BORDER_WIDTH
Default border width, 0.- See Also:
- Constant Field Values
-
DEFAULT_BORDER_RADIUS
public static final int DEFAULT_BORDER_RADIUS
Default border radius, 0.- See Also:
- Constant Field Values
-
DEFAULT_WIDTH
public static final double DEFAULT_WIDTH
Default width, in pixels, 20.0.- See Also:
- Constant Field Values
-
DEFAULT_HEIGHT
public static final double DEFAULT_HEIGHT
Default height, in pixels, 20.0.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MatrixDataset
public MatrixDataset()
Creates a data set.
It uses the global options has default.
-
MatrixDataset
public MatrixDataset(IsDefaultOptions defaultValues)
Creates a data set setting the defaults value.- Parameters:
defaultValues- default options
-
-
Method Detail
-
getDefaultBorderWidth
protected int getDefaultBorderWidth()
Description copied from class:DatasetReturns the default border width value based on type of chart.- Overrides:
getDefaultBorderWidthin classDataset- Returns:
- the default border width value based on type of chart.
-
setDataPoints
public void setDataPoints(MatrixDataPoint... datapoints)
Sets the data property of a data set for a chart is specified as an array of data points.- Parameters:
datapoints- an array of data points
-
setDataPoints
public void setDataPoints(List<MatrixDataPoint> datapoints)
Sets the data property of a data set for a chart is specified as an array of data points.- Parameters:
datapoints- a list of data points
-
getDataPoints
public List<MatrixDataPoint> getDataPoints()
Returns the matrix data property of a dataset for a chart is specified as an array of matrix data points- Returns:
- a list of matrix data points or an empty list of data points.
-
getDataPoints
public List<MatrixDataPoint> getDataPoints(boolean binding)
Returns the matrix data property of a dataset for a chart is specified as an array of matrix data points- Parameters:
binding- iftruebinds the new array list in the container- Returns:
- a list of matrix data points or an empty list of data points
-
setHeight
public void setHeight(double height)
Sets the height of matrix element in pixels.- Parameters:
height- the height of matrix element in pixels
-
getHeight
public double getHeight()
Returns the height of matrix element in pixels.- Returns:
- the height of matrix element in pixels
-
setWidth
public void setWidth(double width)
Sets the width of matrix element in pixels.- Parameters:
width- the width of matrix element in pixels
-
getWidth
public double getWidth()
Returns the width of matrix element in pixels.- Returns:
- the width of matrix element in pixels.
-
setXAnchor
public void setXAnchor(Anchor anchor)
Sets the anchor point on X orientation of matrix element.- Parameters:
anchor- the anchor point on X orientation of matrix element
-
getXAnchor
public Anchor getXAnchor()
Returns the anchor point on X orientation of matrix element.- Returns:
- the anchor point on X orientation of matrix element
-
setYAnchor
public void setYAnchor(Anchor anchor)
Sets the anchor point on Y orientation of matrix element.- Parameters:
anchor- the anchor point on Y orientation of matrix element
-
getYAnchor
public Anchor getYAnchor()
Returns the anchor point on Y orientation of matrix element.- Returns:
- the anchor point on Y orientation of matrix element
-
setBorderRadius
public void setBorderRadius(int borderRadius)
Sets the border radius (in pixels).- Parameters:
borderRadius- the border radius (in pixels).
-
setBorderRadius
public void setBorderRadius(BarBorderRadius borderRadius)
Sets the border radius (in pixels).- Parameters:
borderRadius- the border radius (in pixels).
-
getBorderRadius
public int getBorderRadius()
Returns the border radius (in pixels).- Returns:
- the border radius (in pixels).
-
getBorderRadiusAsObject
public BarBorderRadius getBorderRadiusAsObject()
Returns the border radius (in pixels).- Returns:
- the border radius (in pixels).
-
setBorderWidth
public void setBorderWidth(BarBorderWidth borderWidth)
Sets the border width (in pixels).- Parameters:
borderWidth- the border width (in pixels).
-
getBorderWidthAsObject
public BarBorderWidth getBorderWidthAsObject()
Returns the border width (in pixels).- Returns:
- the border width (in pixels).
-
setHoverBorderWidth
public void setHoverBorderWidth(BarBorderWidth hoverBorderWidth)
Sets the border width (in pixels), when hovered.- Parameters:
hoverBorderWidth- the border width (in pixels), when hovered.
-
getHoverBorderWidthAsObject
public BarBorderWidth getHoverBorderWidthAsObject()
Returns the border width (in pixels), when hovered.- Returns:
- the border width (in pixels), when hovered.
-
setWidth
public void setWidth(SizeCallback widthCallback)
Sets the width callback to set the width of matrix element in pixels.- Parameters:
widthCallback- the width callback
-
getWidthCallback
public SizeCallback getWidthCallback()
Returns the width callback to set the width of matrix element in pixels.- Returns:
- the width callback
-
setWidth
public void setWidth(NativeCallback widthCallback)
Sets the width callback to set the width of matrix element in pixels.- Parameters:
widthCallback- the width callback
-
setHeight
public void setHeight(SizeCallback heightCallback)
Sets the height callback to set the height of matrix element in pixels.- Parameters:
heightCallback- the height callback
-
getHeightCallback
public SizeCallback getHeightCallback()
Returns the height callback to set the height of matrix element in pixels.- Returns:
- the height callback
-
setHeight
public void setHeight(NativeCallback heightCallback)
Sets the height callback to set the height of matrix element in pixels.- Parameters:
heightCallback- the height callback
-
setBorderRadius
public void setBorderRadius(BorderRadiusCallback<DatasetContext> borderRadiusCallback)
Sets the callback to set the border radius (in pixels).- Parameters:
borderRadiusCallback- the border radius callback
-
getBorderRadiusCallback
public BorderRadiusCallback<DatasetContext> getBorderRadiusCallback()
Returns the callback to set the border radius (in pixels).- Returns:
- the border radius callback
-
setBorderRadius
public void setBorderRadius(NativeCallback borderRadiusCallback)
Sets the callback to set the border radius (in pixels).- Parameters:
borderRadiusCallback- the border radius callback
-
setBorderWidth
public void setBorderWidth(BarBorderWidthCallback borderWidthCallback)
Sets the callback to set the border width (in pixels).- Parameters:
borderWidthCallback- the border width callback
-
getBorderWidthCallback
public BarBorderWidthCallback getBorderWidthCallback()
Returns the callback to set the border width (in pixels).- Returns:
- the border width callback
-
setBorderWidth
public void setBorderWidth(NativeCallback borderWidthCallback)
Sets the callback to set the border width (in pixels).- Parameters:
borderWidthCallback- the border width callback
-
setHoverBorderWidth
public void setHoverBorderWidth(BarBorderWidthCallback hoverBorderWidthCallback)
Sets the callback to set the border width (in pixels), when hovered.- Parameters:
hoverBorderWidthCallback- the hover border width callback
-
getHoverBorderWidthCallback
public BarBorderWidthCallback getHoverBorderWidthCallback()
Returns the callback to set the border width (in pixels), when hovered.- Returns:
- the hover border width callback
-
setHoverBorderWidth
public void setHoverBorderWidth(NativeCallback hoverBorderWidthCallback)
Sets the callback to set the border width (in pixels), when hovered.- Parameters:
hoverBorderWidthCallback- the hover border width callback
-
setData
public void setData(double... values)
Throws an exception because not available.
-
-