public class ListDataSet extends AbstractDataSet<ListDataSet> implements DataSet
DataSet interface which keeps the x,y
values in an observable list. It provides methods allowing easily manipulate
of data points. | Modifier and Type | Field and Description |
|---|---|
protected ArrayList<DoublePoint> |
data
Deprecated.
|
protected Map<Integer,String> |
dataLabels
Deprecated.
|
protected Map<Integer,String> |
dataStyles
Deprecated.
|
editConstraints, errorList, infoList, lock, metaInfoMap, name, updateListeners, warningList, xRange, yRangeTAG_GAIN_RANGE, TAG_OVERSHOOT, TAG_UNDERSHOOT| Constructor and Description |
|---|
ListDataSet(String name)
Deprecated.
Creates a new instance of
CustomDataSet. |
ListDataSet(String name,
double[] yValues)
Deprecated.
Creates a new instance of
CustomDataSet. |
ListDataSet(String name,
double[] xValues,
double[] yValues)
Deprecated.
Creates a new instance of
CustomDataSet. |
ListDataSet(String name,
List<DoublePoint> values)
Deprecated.
Creates a new instance of
CustomDataSet. |
| Modifier and Type | Method and Description |
|---|---|
ListDataSet |
add(double[] xValues,
double[] yValues)
Deprecated.
Initialises the data set with specified data.
|
ListDataSet |
add(double x,
double y)
Deprecated.
Add point to the DoublePoints object
|
String |
addDataLabel(int index,
String label)
Deprecated.
adds a custom new data label for a point The label can be used as a
category name if CategoryStepsDefinition is used or for annotations
displayed for data points.
|
String |
addDataStyle(int index,
String style)
Deprecated.
A string representation of the CSS style associated with this specific
DataSet data point. |
ListDataSet |
clearData()
Deprecated.
clear all data points
|
List<DoublePoint> |
getData()
Deprecated.
|
int |
getDataCount()
Deprecated.
Get the number of data points in the data set
|
String |
getDataLabel(int index)
Deprecated.
Returns label of a data point specified by the index.
|
String |
getStyle(int index)
Deprecated.
A string representation of the CSS style associated with this specific
DataSet data point. |
double |
getX(int index)
Deprecated.
Gets the x value of the data point with the index i
|
double |
getY(int index)
Deprecated.
Gets the y value of the data point with the index i
|
ListDataSet |
remove(int[] indices)
Deprecated.
Removes from this data set points with specified indices.
|
ListDataSet |
remove(int fromIndex,
int toIndex)
Deprecated.
remvove sub-range of data points
|
String |
removeDataLabel(int index)
Deprecated.
remove a custom data label for a point The label can be used as a
category name if CategoryStepsDefinition is used or for annotations
displayed for data points.
|
String |
removeStyle(int index)
Deprecated.
A string representation of the CSS style associated with this specific
DataSet data point. |
ListDataSet |
set(int index,
double x,
double y)
Deprecated.
sets new value of existing data point
|
ListDataSet |
set(List<DoublePoint> values)
Deprecated.
replaces values of all existing data points
|
binarySearchX, binarySearchY, clearMetaInfo, computeLimits, fireInvalidated, getDataCount, getDataLabelMap, getDataStyleMap, getEditConstraints, getErrorList, getInfoList, getMetaInfo, getName, getThis, getUndefValue, getWarningList, getXIndex, getXMax, getXMin, getXRange, getYIndex, getYMax, getYMin, getYRange, isAutoNotification, lock, minNeigbourSearchX, setAutoNotifaction, setEditConstraints, setName, toString, unlock, updateEventListenergetStyle, setStyleclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDataCount, getName, getStyle, getUndefValue, getValue, getXIndex, getXMax, getXMin, getXValues, getYIndex, getYMax, getYMin, getYValues, isAutoNotification, lock, setAutoNotifaction, setStyle, unlockaddListener, invokeListener, invokeListener, removeListener, updateEventListenerprotected ArrayList<DoublePoint> data
public ListDataSet(String name)
CustomDataSet.name - name of this DataSet.IllegalArgumentException - if name is
nullpublic ListDataSet(String name, double[] yValues)
CustomDataSet. X coordinates are
equal to data points indices. name - name of this data set.yValues - Y coordinatesIllegalArgumentException - if any of parameters is
nullpublic ListDataSet(String name, double[] xValues, double[] yValues)
Creates a new instance of CustomDataSet.
name - name of this data set.xValues - X coordinatesyValues - Y coordinatesIllegalArgumentException - if any of parameters is
null or if arrays with coordinates have
different lengthspublic ListDataSet(String name, List<DoublePoint> values)
Creates a new instance of CustomDataSet.
name - name of this data set.values - list of data points to setIllegalArgumentException - if any of parameters is
null or if arrays with coordinates have
different lengthspublic List<DoublePoint> getData()
public int getDataCount()
DataSetgetDataCount in interface DataSetpublic ListDataSet clearData()
public double getX(int index)
DataSetpublic double getY(int index)
DataSetpublic ListDataSet set(List<DoublePoint> values)
values - new data pointspublic ListDataSet set(int index, double x, double y)
index - data point indexx - new horizontal valuey - new vertical valuepublic ListDataSet add(double x, double y)
x - coordinatey - coordinatepublic ListDataSet remove(int fromIndex, int toIndex)
fromIndex - start indextoIndex - stop indexpublic ListDataSet remove(int[] indices)
indices - array of indices to be removedpublic ListDataSet add(double[] xValues, double[] yValues)
Initialises the data set with specified data.
Note: The method copies values from specified double arrays.xValues - X coordinatesyValues - Y coordinatespublic String addDataLabel(int index, String label)
addDataLabel in class AbstractDataSet<ListDataSet>index - of the data pointlabel - for the data point specified by the indexnull if no label has
been specifiedpublic String removeDataLabel(int index)
removeDataLabel in class AbstractDataSet<ListDataSet>index - of the data pointnull if no label has
been specifiedpublic String getDataLabel(int index)
getDataLabel in interface DataSetgetDataLabel in class AbstractDataSet<ListDataSet>index - of the data labelnull if
no label has been specifiedpublic String addDataStyle(int index, String style)
DataSet data point. @see #getStyle()addDataStyle in class AbstractDataSet<ListDataSet>index - the index of the specific data pointstyle - for the given data point (CSS-styling)public String removeStyle(int index)
DataSet data point. @see #getStyle()removeStyle in class AbstractDataSet<ListDataSet>index - the index of the specific data pointpublic String getStyle(int index)
DataSet data point. @see #getStyle()getStyle in interface DataSetgetStyle in class AbstractDataSet<ListDataSet>index - the index of the specific data pointCopyright © 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH. All rights reserved.