Module xaos.ui.plot

Class ScatterChartFX<X,​Y>

  • Type Parameters:
    X - Type of X values.
    Y - Type of Y values.
    All Implemented Interfaces:
    Pluggable, Styleable, EventTarget

    public class ScatterChartFX<X,​Y>
    extends ScatterChart<X,​Y>
    implements Pluggable
    A thin extension of the FX ScatterChart supporting custom plugin implementations.
    Author:
    Grzegorz Kruk (original author)., claudio.rosati@esss.se
    • Constructor Detail

      • ScatterChartFX

        public ScatterChartFX​(Axis<X> xAxis,
                              Axis<Y> yAxis)
        Construct a new scatter chart with the given axis.
        Parameters:
        xAxis - The x axis to use.
        yAxis - The y axis to use.
        See Also:
        ScatterChart(Axis, Axis)
      • ScatterChartFX

        public ScatterChartFX​(Axis<X> xAxis,
                              Axis<Y> yAxis,
                              ObservableList<XYChart.Series<X,​Y>> data)
        Construct a new scatter chart with the given axis and data.
        Parameters:
        xAxis - The x axis to use.
        yAxis - The y axis to use.
        data - The data to use, this is the actual list used so any changes to it will be reflected in the chart.
        See Also:
        ScatterChart(Axis, Axis, ObservableList)
    • Method Detail

      • of

        public static ScatterChartFX<Number,​Number> of​(ObservableList<Double> data,
                                                             String seriesName)
        Quick way of creating a scatter chart showing the given data. X axis will contain the index in the data point in the given list.
        Parameters:
        data - The data list to be charted.
        seriesName - The name of the XYChart.Series created from the given data.
        Returns:
        A AreaChartFX chart.
      • addChartPlugins

        public void addChartPlugins​(ObservableList<Plugin> plugins)
        More robust method for adding plugins to chart.

        Note: Only necessary if more than one plugin is being added at once.

        Parameters:
        plugins - List of Plugins to be added.
      • getChart

        public Chart getChart()
        Specified by:
        getChart in interface Pluggable
        Returns:
        The "pluggable" chart.
      • isNotShownInLegend

        public boolean isNotShownInLegend​(String name)
        Description copied from interface: Pluggable
        Returns whether the series with the given name is displayed in chart Legend or not.
        Specified by:
        isNotShownInLegend in interface Pluggable
        Parameters:
        name - The name of the series to be checked.
        Returns:
        true if the series with the given name is not shown in chart Legend.
      • isSeriesDrawn

        public boolean isSeriesDrawn​(String name)
      • setHVLSeries

        public final void setHVLSeries​(int horizontal,
                                       int vertical,
                                       int longitudinal)
        Sets which series has to be considered "horizontal", "vertical" and "longitudinal". Special colors will be used to represent horizontal (red), vertical (blue) and longitudinal (green) series.
        Parameters:
        horizontal - Index of the horizontal series. Use -1 if no horizontal series exists.
        vertical - Index of the vertical series. Use -1 if no vertical series exists.
        longitudinal - Index of the longitudinal series. Use -1 if no longitudinal series exists.
      • setNotShownInLegend

        public final void setNotShownInLegend​(String name)
        Description copied from interface: Pluggable
        Specifies a series to not be shown in chart Legend.
        Specified by:
        setNotShownInLegend in interface Pluggable
        Parameters:
        name - The name of the series to not be shown in chart Legend.