public class ListSeries extends AbstractSeries
Constructor and Description |
---|
ListSeries() |
ListSeries(Collection<Number> values)
Constructs a ListSeries with the given collection of values.
|
ListSeries(Number... values)
Constructs a ListSeries with the given array of values.
|
ListSeries(String name)
Constructs a ListSeries with the given series name.
|
ListSeries(String name,
Collection<Number> values)
Constructs a ListSeries with the given series name and collection of
values.
|
ListSeries(String name,
Number... values)
Constructs a ListSeries with the given series name and array of values.
|
Modifier and Type | Method and Description |
---|---|
void |
addData(Number number)
Adds a given number to the series and immediately updates the chart if it
already has been drawn.
|
void |
addData(Number number,
boolean updateChartImmediately,
boolean shift)
Adds a given number to the series and optionally immediately updates the
chart if it has been drawn.
|
Number[] |
getData() |
void |
setData(List<Number> data)
Sets the given list of numeric values as the values in this list series.
|
void |
setData(Number... values)
Sets the values in the list series to the ones provided.
|
void |
updatePoint(int pointIndex,
Number newValue)
Updates the value of the data point at pointIndex to newValue and
immediately updates it on the chart using animation if enabled.
|
getConfiguration, getId, getName, getPlotOptions, getStack, getxAxis, getyAxis, isVisible, setConfiguration, setId, setName, setPlotOptions, setStack, setVisible, setVisible, setxAxis, setyAxis, setyAxis, updateSeries
public ListSeries()
public ListSeries(String name)
name
- public ListSeries(Number... values)
values
- public ListSeries(Collection<Number> values)
values
- the values to usepublic ListSeries(String name, Number... values)
name
- values
- public ListSeries(String name, Collection<Number> values)
name
- the name of the seriesvalues
- the values to usepublic Number[] getData()
public void setData(Number... values)
values
- public void setData(List<Number> data)
data
- public void addData(Number number)
number
- the number to be added to the seriespublic void addData(Number number, boolean updateChartImmediately, boolean shift)
number
- the number to be added to the seriesupdateChartImmediately
- if true the chart will be dynamically updated, using animation
if enabled.shift
- If true, the first item from the series is removed. Handy if
dynamically adjusting adding points and fixed amount of points
should be kept visible.public void updatePoint(int pointIndex, Number newValue)
pointIndex
- the index of the point to updatenewValue
- the new value of the pointCopyright © 2025. All rights reserved.