Skip to content

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.

ReturnsSignatureSummary
ChartDatacreate() factoryCreates an empty series.
ChartDatacreate(Map<String,Number> dataMap) factoryCreates a series that uses this map of values by label.
ChartData() protectedCalled by a subclass to create an empty series.
ChartData(Map<String,Number> dataMap) protectedCalled by a subclass with the map of values by label.

PropertyTypeDefaultSummary
dataMapMap<String,Number>set at creationThe values by label; setting it replaces the map.

ReturnsSignatureSummary
booleanisEmpty()If true, the series has no value.
NumbergetMin()The smallest value, or 0 for an empty series.
NumbergetMax()The largest value, or 0 for an empty series.
NumbergetAverage()The average of the values, or 0 for an empty series.
Numberget(String label)The value of a label, or null.
booleanhas(String label)If true, the series has a value for this label.
thisadd(String label, Number data) fluentSets the value of a label.
thisremove(String label) fluentRemoves the value of a label.

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.

  • this dataMap(Map<String,Number> dataMap) fluent
  • Map<String,Number> getDataMap()

Default: set at creation

The values by label; setting it replaces the map.

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.


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

Report a problem with this page