Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: Chart

[16:7] extends: Region

The Chart class wraps javafx.scene.chart.Chart, the abstract base for every JavaFX chart (the XYChart family and PieChart). It extends Region and provides the title, legend, and animation settings shared by all charts. This wrapper is not constructed directly. Concrete charts extend it, mirroring the JavaFX inheritance model, and set this.obj in their own constructors.

Methods

  • Chart ()

    Base constructor. Chart is abstract and is never instantiated on its own.

  • setTitle (string Title)

    Sets the chart title displayed above the plot area.

    • @p Title is a string with the title text.
    • @r this object for chaining
  • getTitle ()

    Returns the chart title.

    • @r A string with the title text, or null when none is set.
  • titleProperty ()

    Returns the StringProperty backing the title.

    • @r An AJO wrapping javafx.beans.property.StringProperty.
  • setTitleSide (string SideName)

    Sets which side of the chart the title appears on.

    • @p SideName is a javafx.geometry.Side constant name: TOP, BOTTOM, LEFT, or RIGHT.
    • @r this object for chaining
  • getTitleSide ()

    Returns which side of the chart the title appears on.

    • @r An AJO wrapping javafx.geometry.Side.
  • titleSideProperty ()

    Returns the ObjectProperty backing the title side.

    • @r An AJO wrapping ObjectProperty.
  • setLegendVisible (bool Visible)

    Sets whether the chart legend is visible.

    • @p Visible is a bool; true shows the legend.
    • @r this object for chaining
  • isLegendVisible ()

    Returns whether the chart legend is visible.

    • @r A bool that is true when the legend is shown.
  • legendVisibleProperty ()

    Returns the BooleanProperty backing the legend visibility.

    • @r An AJO wrapping javafx.beans.property.BooleanProperty.
  • setLegendSide (string SideName)

    Sets which side of the chart the legend appears on.

    • @p SideName is a javafx.geometry.Side constant name: TOP, BOTTOM, LEFT, or RIGHT.
    • @r this object for chaining
  • getLegendSide ()

    Returns which side of the chart the legend appears on.

    • @r An AJO wrapping javafx.geometry.Side.
  • legendSideProperty ()

    Returns the ObjectProperty backing the legend side.

    • @r An AJO wrapping ObjectProperty.
  • setAnimated (bool Animated)

    Sets whether chart changes are animated.

    • @p Animated is a bool; true enables animation.
    • @r this object for chaining
  • getAnimated ()

    Returns whether chart changes are animated.

    • @r A bool that is true when animation is enabled.
  • animatedProperty ()

    Returns the BooleanProperty backing the animated flag.

    • @r An AJO wrapping javafx.beans.property.BooleanProperty.