ChartNode.ChartData
class ChartNode.ChartData
Package: dev.joid.lib.ui.node.impl.chart · Module: core · Source: ChartNode.java
One series of a chart: a value for each label of the X axis.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
ChartData | create() factory | Creates an empty series. |
ChartData | create(Map<String,Number> dataMap) factory | Creates a series that uses this map of values by label. |
| ChartData() protected | Called by a subclass to create an empty series. | |
| ChartData(Map<String,Number> dataMap) protected | Called by a subclass with the map of values by label. |
Properties
Section titled “Properties”| Property | Type | Default | Summary |
|---|---|---|---|
| dataMap | Map<String,Number> | set at creation | The values by label; setting it replaces the map. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
boolean | isEmpty() | If true, the series has no value. |
Number | getMin() | The smallest value, or 0 for an empty series. |
Number | getMax() | The largest value, or 0 for an empty series. |
Number | getAverage() | The average of the values, or 0 for an empty series. |
Number | get(String label) | The value of a label, or null. |
boolean | has(String label) | If true, the series has a value for this label. |
this | add(String label, Number data) fluent | Sets the value of a label. |
this | remove(String label) fluent | Removes the value of a label. |
Creation details
Section titled “Creation details”create
Section titled “create”ChartData create() factory
Creates an empty series.
ChartData create(Map<String,Number> dataMap) factory
Creates a series that uses this map of values by label.
ChartData
Section titled “ChartData”ChartData() protected
Called by a subclass to create an empty series.
ChartData(Map<String,Number> dataMap) protected
Called by a subclass with the map of values by label.
Property details
Section titled “Property details”dataMap
Section titled “dataMap”this dataMap(Map<String,Number> dataMap)fluentMap<String,Number> getDataMap()
Default: set at creation
The values by label; setting it replaces the map.
Method details
Section titled “Method details”isEmpty
Section titled “isEmpty”boolean isEmpty()
If true, the series has no value.
getMin
Section titled “getMin”Number getMin()
The smallest value, or 0 for an empty series.
getMax
Section titled “getMax”Number getMax()
The largest value, or 0 for an empty series.
getAverage
Section titled “getAverage”Number getAverage()
The average of the values, or 0 for an empty series.
Number get(String label)
The value of a label, or null.
boolean has(String label)
If true, the series has a value for this label.
this add(String label, Number data) fluent
Sets the value of a label.
remove
Section titled “remove”this remove(String label) fluent
Removes the value of a label.
fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses
