java.lang.Object
javafx.scene.Node
javafx.scene.Parent
javafx.scene.layout.Region
javafx.scene.layout.Pane
javafx.scene.layout.VBox
com.iamsoft.util.ui.javafx.chart.MultiXYChart<X,Y>
- Type Parameters:
X- Type of horizontal (X) axis.Y- Type of vertical (Y) axis.
- All Implemented Interfaces:
javafx.css.Styleable,javafx.event.EventTarget
- Direct Known Subclasses:
TableTimeSeriesChart
@DefaultProperty("layers")
public class MultiXYChart<X,Y>
extends javafx.scene.layout.VBox
Supports guide-lines and multiple axes. For the multi-chart to work properly, it is
imperative the Y-axes to be configured properly before assigning them to
MultiXYChart.XYChartLayer - auto-ranging should be set to
false and
proper lower/upper bounds should be set.-
Property Summary
PropertiesTypePropertyDescriptionfinal javafx.beans.property.BooleanPropertyfinal javafx.beans.property.BooleanPropertyfinal javafx.beans.property.ObjectProperty<ClosestDataPointFunction<X, Y>> final javafx.beans.property.BooleanPropertyfinal javafx.beans.property.BooleanPropertyfinal javafx.beans.property.ReadOnlyDoublePropertyfinal javafx.beans.property.ReadOnlyDoublePropertyfinal javafx.beans.property.ReadOnlyDoublePropertyfinal javafx.beans.property.ReadOnlyDoublePropertyProperties inherited from class javafx.scene.layout.VBox
alignment, fillWidth, spacingProperties inherited from class javafx.scene.layout.Region
background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, widthProperties inherited from class javafx.scene.Parent
needsLayoutProperties inherited from class javafx.scene.Node
accessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, focusVisible, focusWithin, hover, id, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, viewOrder, visible -
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classTo properly maintain Y-axis ranges between multiple Y-axes, proper lower/upper bounds should be set for Y-axes before creating chart layers. -
Field Summary
Fields inherited from class javafx.scene.layout.Region
USE_COMPUTED_SIZE, USE_PREF_SIZEFields inherited from class javafx.scene.Node
BASELINE_OFFSET_SAME_AS_HEIGHT -
Constructor Summary
ConstructorsConstructorDescriptionMultiXYChart(boolean pDistinctStrokes, boolean pClosestToMouseMarkerAmongAllSeries) MultiXYChart(Double pStrokeWidth) MultiXYChart(Double pStrokeWidth, boolean pDistinctStrokes, boolean pClosestToMouseMarkerAmongAllSeries) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidfinal javafx.beans.property.BooleanPropertyfinal javafx.beans.property.BooleanPropertyfinal javafx.beans.property.ObjectProperty<ClosestDataPointFunction<X, Y>> final javafx.beans.value.ObservableValue<javafx.geometry.Insets> Insets that define location of chart content.voiddispose()final javafx.collections.ObservableList<javafx.scene.chart.Axis<?>> final ClosestDataPointFunction<X, Y> Gets the value of theclosestDataPointFunctionproperty.javafx.collections.ObservableList<javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.chart.XYChart.Data<X, Y>>> Gets the value of theclosestToMouseStringConverterproperty.final javafx.geometry.Insetsfinal javafx.collections.ObservableList<MultiXYChart.XYChartLayer<? extends X, ? extends Y>> List of layers that make up chart.final booleanGets the value of thesnapToClosestPointproperty.final doubleGets the value of thexAxisLowerBoundproperty.final doubleGets the value of thexAxisUpperBoundproperty.final doubleGets the value of theyAxisLowerBoundproperty.final doubleGets the value of theyAxisUpperBoundproperty.final booleanGets the value of theautoRangingproperty.final booleanGets the value of theautoTrimmingTickLabelFormattingproperty.final booleanGets the value of thelegendVisibleproperty.final javafx.beans.property.BooleanPropertyfinal voidsetAutoRanging(boolean pAutoRanging) Sets the value of theautoRangingproperty.final voidsetAutoTrimmingTickLabelFormatting(boolean pAutoTrimmingTickLabelFormatting) Sets the value of theautoTrimmingTickLabelFormattingproperty.final voidsetClosestDataPointFunction(ClosestDataPointFunction<X, Y> pClosestDataPointFunction) Sets the value of theclosestDataPointFunctionproperty.final voidsetClosestToMouseStringConverter(Function<javafx.scene.chart.XYChart.Data<X, Y>, String> pStringConverter) Sets the value of theclosestToMouseStringConverterproperty.final voidsetLegendVisible(boolean pVisible) Sets the value of thelegendVisibleproperty.final voidsetSnapToClosestPoint(boolean pSnap) Sets the value of thesnapToClosestPointproperty.final javafx.beans.property.BooleanPropertyfinal javafx.beans.property.ReadOnlyDoublePropertyfinal javafx.beans.property.ReadOnlyDoublePropertyfinal javafx.beans.property.ReadOnlyDoublePropertyfinal javafx.beans.property.ReadOnlyDoublePropertyMethods inherited from class javafx.scene.layout.VBox
alignmentProperty, clearConstraints, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, fillWidthProperty, getAlignment, getClassCssMetaData, getContentBias, getCssMetaData, getMargin, getSpacing, getVgrow, isFillWidth, layoutChildren, requestLayout, setAlignment, setFillWidth, setMargin, setSpacing, setVgrow, spacingPropertyMethods inherited from class javafx.scene.layout.Pane
getChildrenMethods inherited from class javafx.scene.layout.Region
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, computeMaxHeight, computeMaxWidth, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, isResizable, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthPropertyMethods inherited from class javafx.scene.Parent
getBaselineOffset, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, queryAccessibleAttribute, requestParentLayout, setNeedsLayout, updateBoundsMethods inherited from class javafx.scene.Node
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, focusVisibleProperty, focusWithinProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInitialFocusTraversable, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isFocusVisible, isFocusWithin, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visiblePropertyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface javafx.css.Styleable
getStyleableNode
-
Property Details
-
autoRanging
public final javafx.beans.property.BooleanProperty autoRangingProperty- See Also:
-
autoTrimmingTickLabelFormatting
public final javafx.beans.property.BooleanProperty autoTrimmingTickLabelFormattingProperty- See Also:
-
snapToClosestPoint
public final javafx.beans.property.BooleanProperty snapToClosestPointProperty- See Also:
-
xAxisLowerBound
public final javafx.beans.property.ReadOnlyDoubleProperty xAxisLowerBoundProperty- See Also:
-
xAxisUpperBound
public final javafx.beans.property.ReadOnlyDoubleProperty xAxisUpperBoundProperty- See Also:
-
yAxisLowerBound
public final javafx.beans.property.ReadOnlyDoubleProperty yAxisLowerBoundProperty- See Also:
-
yAxisUpperBound
public final javafx.beans.property.ReadOnlyDoubleProperty yAxisUpperBoundProperty- See Also:
-
legendVisible
public final javafx.beans.property.BooleanProperty legendVisibleProperty- See Also:
-
closestToMouseStringConverter
public final javafx.beans.property.ObjectProperty<Function<javafx.scene.chart.XYChart.Data<X,Y>, closestToMouseStringConverterPropertyString>> - See Also:
-
closestDataPointFunction
public final javafx.beans.property.ObjectProperty<ClosestDataPointFunction<X,Y>> closestDataPointFunctionProperty- See Also:
-
-
Constructor Details
-
MultiXYChart
public MultiXYChart() -
MultiXYChart
-
MultiXYChart
public MultiXYChart(boolean pDistinctStrokes, boolean pClosestToMouseMarkerAmongAllSeries) - Parameters:
pDistinctStrokes- Iftrue, series lines of a layer will have distinct strokes and each layer will have distinct color for series lines. Otherwise, series lines of a layer will have distinct colors and each layer will have distinct stroke.
-
MultiXYChart
public MultiXYChart(Double pStrokeWidth, boolean pDistinctStrokes, boolean pClosestToMouseMarkerAmongAllSeries) - Parameters:
pDistinctStrokes- Iftrue, series lines of a layer will have distinct strokes and each layer will have distinct color for series lines. Otherwise, series lines of a layer will have distinct colors and each layer will have distinct stroke.
-
-
Method Details
-
contentInsets
public final javafx.beans.value.ObservableValue<javafx.geometry.Insets> contentInsets()Insets that define location of chart content. TODO: use Bounds? -
getContentInsets
public final javafx.geometry.Insets getContentInsets() -
autoRangingProperty
public final javafx.beans.property.BooleanProperty autoRangingProperty()- Returns:
- the
autoRangingproperty - See Also:
-
isAutoRanging
public final boolean isAutoRanging()Gets the value of theautoRangingproperty.- Property description:
- Returns:
- the value of the
autoRangingproperty - See Also:
-
setAutoRanging
public final void setAutoRanging(boolean pAutoRanging) Sets the value of theautoRangingproperty.- Property description:
- Parameters:
pAutoRanging- the value for theautoRangingproperty- See Also:
-
autoTrimmingTickLabelFormattingProperty
public final javafx.beans.property.BooleanProperty autoTrimmingTickLabelFormattingProperty()- Returns:
- the
autoTrimmingTickLabelFormattingproperty - See Also:
-
isAutoTrimmingTickLabelFormatting
public final boolean isAutoTrimmingTickLabelFormatting()Gets the value of theautoTrimmingTickLabelFormattingproperty.- Property description:
- Returns:
- the value of the
autoTrimmingTickLabelFormattingproperty - See Also:
-
setAutoTrimmingTickLabelFormatting
public final void setAutoTrimmingTickLabelFormatting(boolean pAutoTrimmingTickLabelFormatting) Sets the value of theautoTrimmingTickLabelFormattingproperty.- Property description:
- Parameters:
pAutoTrimmingTickLabelFormatting- the value for theautoTrimmingTickLabelFormattingproperty- See Also:
-
snapToClosestPointProperty
public final javafx.beans.property.BooleanProperty snapToClosestPointProperty()- Returns:
- the
snapToClosestPointproperty - See Also:
-
getSnapToClosestPoint
public final boolean getSnapToClosestPoint()Gets the value of thesnapToClosestPointproperty.- Property description:
- Returns:
- the value of the
snapToClosestPointproperty - See Also:
-
setSnapToClosestPoint
public final void setSnapToClosestPoint(boolean pSnap) Sets the value of thesnapToClosestPointproperty.- Property description:
- Parameters:
pSnap- the value for thesnapToClosestPointproperty- See Also:
-
xAxisLowerBoundProperty
public final javafx.beans.property.ReadOnlyDoubleProperty xAxisLowerBoundProperty()- Returns:
- the
xAxisLowerBoundproperty - See Also:
-
getXAxisLowerBound
public final double getXAxisLowerBound()Gets the value of thexAxisLowerBoundproperty.- Property description:
- Returns:
- the value of the
xAxisLowerBoundproperty - See Also:
-
xAxisUpperBoundProperty
public final javafx.beans.property.ReadOnlyDoubleProperty xAxisUpperBoundProperty()- Returns:
- the
xAxisUpperBoundproperty - See Also:
-
getXAxisUpperBound
public final double getXAxisUpperBound()Gets the value of thexAxisUpperBoundproperty.- Property description:
- Returns:
- the value of the
xAxisUpperBoundproperty - See Also:
-
yAxisLowerBoundProperty
public final javafx.beans.property.ReadOnlyDoubleProperty yAxisLowerBoundProperty()- Returns:
- the
yAxisLowerBoundproperty - See Also:
-
getYAxisLowerBound
public final double getYAxisLowerBound()Gets the value of theyAxisLowerBoundproperty.- Property description:
- Returns:
- the value of the
yAxisLowerBoundproperty - See Also:
-
yAxisUpperBoundProperty
public final javafx.beans.property.ReadOnlyDoubleProperty yAxisUpperBoundProperty()- Returns:
- the
yAxisUpperBoundproperty - See Also:
-
getYAxisUpperBound
public final double getYAxisUpperBound()Gets the value of theyAxisUpperBoundproperty.- Property description:
- Returns:
- the value of the
yAxisUpperBoundproperty - See Also:
-
legendVisibleProperty
public final javafx.beans.property.BooleanProperty legendVisibleProperty()- Returns:
- the
legendVisibleproperty - See Also:
-
isLegendVisible
public final boolean isLegendVisible()Gets the value of thelegendVisibleproperty.- Property description:
- Returns:
- the value of the
legendVisibleproperty - See Also:
-
setLegendVisible
public final void setLegendVisible(boolean pVisible) Sets the value of thelegendVisibleproperty.- Property description:
- Parameters:
pVisible- the value for thelegendVisibleproperty- See Also:
-
closestToMouseStringConverterProperty
public final javafx.beans.property.ObjectProperty<Function<javafx.scene.chart.XYChart.Data<X,Y>, closestToMouseStringConverterProperty()String>> - Returns:
- the
closestToMouseStringConverterproperty - See Also:
-
getClosestToMouseStringConverter
public final Function<javafx.scene.chart.XYChart.Data<X,Y>, getClosestToMouseStringConverter()String> Gets the value of theclosestToMouseStringConverterproperty.- Property description:
- Returns:
- the value of the
closestToMouseStringConverterproperty - See Also:
-
setClosestToMouseStringConverter
public final void setClosestToMouseStringConverter(Function<javafx.scene.chart.XYChart.Data<X, Y>, String> pStringConverter) Sets the value of theclosestToMouseStringConverterproperty.- Property description:
- Parameters:
pStringConverter- the value for theclosestToMouseStringConverterproperty- See Also:
-
closestDataPointFunctionProperty
public final javafx.beans.property.ObjectProperty<ClosestDataPointFunction<X,Y>> closestDataPointFunctionProperty()- Returns:
- the
closestDataPointFunctionproperty - See Also:
-
getClosestDataPointFunction
Gets the value of theclosestDataPointFunctionproperty.- Property description:
- Returns:
- the value of the
closestDataPointFunctionproperty - See Also:
-
setClosestDataPointFunction
public final void setClosestDataPointFunction(ClosestDataPointFunction<X, Y> pClosestDataPointFunction) Sets the value of theclosestDataPointFunctionproperty.- Property description:
- Parameters:
pClosestDataPointFunction- the value for theclosestDataPointFunctionproperty- See Also:
-
getLayers
public final javafx.collections.ObservableList<MultiXYChart.XYChartLayer<? extends X,? extends Y>> getLayers()List of layers that make up chart. Note that layers may share axes. Axes are pushed out from chart in the order they appear in this list. In other words, if there are two distinct west-side axes at indices 0 and 1, the axis at index 1 will be displayed to the west of axis at index 0. -
getAlternateSideAxes
public final javafx.collections.ObservableList<javafx.scene.chart.Axis<?>> getAlternateSideAxes() -
getClosestToMousePoints
-
autoRange
public void autoRange() -
autoRangeX
public void autoRangeX() -
autoRangeY
public void autoRangeY() -
dispose
public void dispose()
-