ChartNode
abstract class ChartNode
Extends: Node
Package: dev.joid.lib.ui.node.impl.chart · Module: core · Source: ChartNode.java
Base class of a chart that shows named series of values over the labels of an X axis.

Description
Section titled “Description”A chart draws nothing by itself: a subclass draws its data, and the chart computes the bounds of the scale. It waits until it has data and every series has a value, drawing its skeleton meanwhile.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
| ChartNode(double x, double y, double width, double height) protected | Called by a subclass with the position and the size of the chart. |
Properties
Section titled “Properties”| Property | Type | Default | Summary |
|---|---|---|---|
| xAxis signal | XChartAxis | null | The X axis: its labels and the series of the chart. |
| yAxis signal | YChartAxis | null | The Y axis: its name and the prefix and suffix of its values. |
Inherited from Node (24)
x · y · width · height · position · anchor · anchorX · anchorY · aspectRatio · zindex · zlevel · skeleton · visible · enabled · interactive · cursor · hoverDuration · hoverEquation · hover · overflow · scrollSpeed · scrollbar · label · draggable
Methods
Section titled “Methods”Queries
Section titled “Queries”| Returns | Signature | Summary |
|---|---|---|
Number | getMin() | Bottom of the scale over every series: the smallest value, or 0 when every value is the same and positive. |
Number | getMin(String data) | Bottom of the scale of one series. |
Number | getMax() | Top of the scale over every series: the largest value, or 1 when every value is 0. |
Number | getMax(String data) | Top of the scale of one series. |
Number | getAverage() | Average of the averages of the series. |
Number | getAverage(String data) | Average of one series. |
Set<String> | getLabels() | The labels of the X axis. |
ChartData | getData(String data) | The series of this name, or null. |
Map<String,ChartData> | getDataMap() | Every series by name, in the order they were added; a read-only view. |
Actions
Section titled “Actions”| Returns | Signature | Summary |
|---|---|---|
this | data(String dataName, ChartData data) fluent | Adds or replaces the series of this name. |
this | removeData(String data) fluent | Removes the series of this name. |
For subclasses
Section titled “For subclasses”| Returns | Signature | Summary |
|---|---|---|
double | scaleMin(double min, double max) static protected | Bottom of the scale for these smallest and largest values: the smallest, or 0 when both are equal and positive. |
double | scaleMax(double min, double max) static protected | Top of the scale for these smallest and largest values: the largest, 0 when both are equal and negative, or 1 when both are 0. |
Inherited from Node (128)
load · render · renderHover · updateScroll · updateScrollX · updateScrollY · append · attach · body · clearChildren · getChild · getChildren · getNodeListAt · getParent · isAttached · getAbsoluteX · getAbsoluteY · getAbsoluteDefaultX · getAbsoluteDefaultY · toDrawX · toDrawY · w · h · dw · dh · mw · mh · aw · ah · ax · ay · getDefaultWidth · getDefaultHeight · removeHover · clearHover · refreshHover · getResolvedCursor · hoverValue · getHoverAnimator · isHovered · handleMousePressed · handleMouseReleased · handleMouseDragged · handleMouseScroll · handleCharTyped · handleKeyPressed · handleKeyReleased · getLastClickTime · getLastClickButton · getLastKey · getLastKeyTime · scrollX · scrollY · scrollTo · beforeScroll · hasOverflowX · hasOverflowY · getOverflowArea · getScrollX · getScrollY · getTargetScrollX · getTargetScrollY · getMaxScrollX · getMaxScrollY · isScrollEndX · isScrollEndY · startDragging · stopDragging · beforeDragStart · beforeDragDrop · isDragging · getDragX · getDragY · isDragged · getDragSource · getDraggedNode · getStartDragX · getStartDragY · getTargetDragX · getTargetDragY · effect · removeEffect · clearEffects · hasEffect · getEffect · layer · clearLayers · animate · removeAnimator · wait · watch · hasListener · isVisibleProperty · isMounted · getIndex · getUi · getHierarchy · getMappedIndex · getTaskList · getShortcutList · toJson · toString · getEventBus · getBodyConsumer · getDefaultX · getDefaultY · getLayoutX · getLayoutY · getShiftX · getShiftY · isStepping · getLastCodepoint · getLoadCount · getRenderTime · remove · self · copy · useStore · addTask · removeTask · addShortcut · removeShortcut · layoutPosition · layoutSize · fit · move · beforeMove · hoverColor
Events
Section titled “Events”Inherited from Node (21)
onUpdate · onDetach · onInit · onRender · onDraw · onMount · onHoverStart · onHover · onHoverEnd · onScroll · onScrollToEnd · onScrollEndReached · onDragStart · onDrag · onDragDrop · onDragSnap · onMove · onChildAppend · onClick · onAnimate · onWatch
Creation details
Section titled “Creation details”ChartNode
Section titled “ChartNode”ChartNode(double x, double y, double width, double height) protected
Called by a subclass with the position and the size of the chart.
The chart throws an IllegalStateException when it is attached without an X axis or a Y axis.
Property details
Section titled “Property details”this xAxis(XChartAxis xAxis)fluentthis xAxis(Supplier<XChartAxis> xAxis)fluent signalXChartAxis getXAxis()
Default: null
The X axis: its labels and the series of the chart.
this yAxis(YChartAxis yAxis)fluentthis yAxis(Supplier<YChartAxis> yAxis)fluent signalYChartAxis getYAxis()
Default: null
The Y axis: its name and the prefix and suffix of its values.
Method details
Section titled “Method details”getMin
Section titled “getMin”Number getMin()
Bottom of the scale over every series: the smallest value, or 0 when every value is the same and positive.
Number getMin(String data)
Bottom of the scale of one series.
getMax
Section titled “getMax”Number getMax()
Top of the scale over every series: the largest value, or 1 when every value is 0.
Number getMax(String data)
Top of the scale of one series.
getAverage
Section titled “getAverage”Number getAverage()
Average of the averages of the series.
Number getAverage(String data)
Average of one series.
getLabels
Section titled “getLabels”Set<String> getLabels()
The labels of the X axis.
getData
Section titled “getData”ChartData getData(String data)
The series of this name, or null.
getDataMap
Section titled “getDataMap”Map<String,ChartData> getDataMap()
Every series by name, in the order they were added; a read-only view.
this data(String dataName, ChartData data) fluent
Throws:
IllegalStateException: The … has no X axis to hold the data …, call xAxis(…) before data(…)
Adds or replaces the series of this name.
Throws an IllegalStateException when the chart has no X axis yet.
removeData
Section titled “removeData”this removeData(String data) fluent
Throws:
IllegalStateException: The … has no X axis to remove the data … from, call xAxis(…) before removeData(…)
Removes the series of this name.
Throws an IllegalStateException when the chart has no X axis yet.
scaleMin
Section titled “scaleMin”double scaleMin(double min, double max) static protected
Bottom of the scale for these smallest and largest values: the smallest, or 0 when both are equal and positive.
scaleMax
Section titled “scaleMax”double scaleMax(double min, double max) static protected
Top of the scale for these smallest and largest values: the largest, 0 when both are equal and negative, or 1 when both are 0.
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
