public final class Data extends NativeObjectContainer implements ConfigurationElement
Constructor and Description |
---|
Data()
Creates the object with an empty native object.
|
Modifier and Type | Method and Description |
---|---|
List<Dataset> |
getDatasets()
Returns the list of datasets.
|
List<Dataset> |
getDatasets(boolean binding)
Returns the list of datasets.
|
Labels |
getLabels()
Returns the labels.
|
Labels |
getLabels(boolean binding)
Returns the labels for axes.
|
Labels |
getXLabels()
Returns the labels for X axes.
|
Labels |
getXLabels(boolean binding)
Returns the labels for X axes.
|
Labels |
getYLabels()
Returns the labels for Y axes.
|
Labels |
getYLabels(boolean binding)
Returns the labels for Y axes.
|
boolean |
isCanvasObjectHandling()
Returns
true if the plugin to manage canvas object (gradients and patterns) has been forcedly disable.Pay attention that disabling the handler, your datasets configuration with gradients or patterns will e showed with default color. |
void |
load(IsChart chart,
Configuration configuration)
Called to enable to load into a configuration object the specific configuration item (by native object).
|
Dataset |
retrieveDataset(LegendItem legendItem)
Returns a dataset instance by legend item locator, dataset index and index.
|
Dataset |
retrieveDataset(TooltipItem tooltipItem)
Returns a dataset instance by tooltip item locator, dataset index and index.
|
Gradient |
retrieveFillStyleAsGradient(LegendItem legendItem)
Returns a gradient object set as background color for a dataset related to legend item.
|
Pattern |
retrieveFillStyleAsPattern(LegendItem legendItem)
Returns a pattern object set as background color for a dataset related to legend item.
|
Gradient |
retrieveStrokeStyleAsGradient(LegendItem legendItem)
Returns a gradient object set as border color for a dataset related to legend item.
|
Pattern |
retrieveStrokeStyleAsPattern(LegendItem legendItem)
Returns a pattern object set as border color for a dataset related to legend item.
|
void |
setCanvasObjectHandling(boolean canvasObjectHandling)
Sets
true if the plugin to manage canvas object (gradients and patterns) have to be forcedly disable.Pay attention that disabling the handler, your datasets configuration with gradients or patterns will e showed with default color. |
void |
setDatasets(Dataset... datasets)
Sets a set of datasets for chart.
|
void |
setLabels(Labels labels)
Sets the labels of the data.
|
void |
setLabels(String... labels)
Sets the labels of the data.
|
void |
setXLabels(Labels labels)
Sets the labels for X axes of the data.
|
void |
setXLabels(String... labels)
Sets the labels for X axes of the data.
|
void |
setYLabels(Labels labels)
Sets the labels for Y axes of the data.
|
void |
setYLabels(String... labels)
Sets the labels for Y axes of the data.
|
checkValue, empty, getArrayValue, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, keys, remove, remove, removeIfExists, setArrayValue, setArrayValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
public void setLabels(String... labels)
labels
- array of labelspublic void setLabels(Labels labels)
labels
- labels object to manage also multi-line labelspublic Labels getLabels()
public Labels getLabels(boolean binding)
binding
- if true
binds the new labels into containerpublic void setXLabels(String... labels)
labels
- array of labelspublic void setXLabels(Labels labels)
labels
- labels object to manage also multi-line labelspublic Labels getXLabels()
public Labels getXLabels(boolean binding)
binding
- if true
binds the new labels into containerpublic void setYLabels(String... labels)
labels
- array of labelspublic void setYLabels(Labels labels)
labels
- labels object to manage also multi-line labelspublic Labels getYLabels()
public Labels getYLabels(boolean binding)
binding
- if true
binds the new labels into containerpublic void setDatasets(Dataset... datasets)
null
, removes all datasets.datasets
- set of dataset. If null
, removes all datasetspublic List<Dataset> getDatasets()
public List<Dataset> getDatasets(boolean binding)
binding
- if true
binds the new array list into containerpublic boolean isCanvasObjectHandling()
true
if the plugin to manage canvas object (gradients and patterns) has been forcedly disable.true
if the plugin to manage canvas object (gradients and patterns) has been forcedly disablepublic void setCanvasObjectHandling(boolean canvasObjectHandling)
true
if the plugin to manage canvas object (gradients and patterns) have to be forcedly disable.canvasObjectHandling
- true
if the plugin to manage canvas object (gradients and patterns) have to be
forcedly disablepublic final Gradient retrieveFillStyleAsGradient(LegendItem legendItem)
legendItem
- legend item instance to get the dataset related to.null
if not found by legend itempublic final Gradient retrieveStrokeStyleAsGradient(LegendItem legendItem)
legendItem
- legend item instance to get the dataset related to.null
if not found by legend itempublic final Pattern retrieveFillStyleAsPattern(LegendItem legendItem)
legendItem
- legend item instance to get the dataset related to.null
if not found by legend itempublic final Pattern retrieveStrokeStyleAsPattern(LegendItem legendItem)
legendItem
- legend item instance to get the dataset related to.null
if not found by legend itempublic final Dataset retrieveDataset(LegendItem legendItem)
legendItem
- legend item instance to get the dataset related to.null
if not found by legend itempublic final Dataset retrieveDataset(TooltipItem tooltipItem)
tooltipItem
- legend item instance to get the dataset related to.null
if not found by tooltip itempublic void load(IsChart chart, Configuration configuration)
ConfigurationElement
load
in interface ConfigurationElement
chart
- chart instanceconfiguration
- chart configuration instance