Module xaos.ui.plot

Class BarChartFX<X,​Y>

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

    public class BarChartFX<X,​Y>
    extends BarChart<X,​Y>
    implements Pluggable
    A thin extension of the FX BarChart supporting custom plugin implementations.
    Author:
    Grzegorz Kruk
    • Constructor Detail

      • BarChartFX

        public BarChartFX​(Axis<X> xAxis,
                          Axis<Y> yAxis)
        Construct a new bar chart with the given axis. The two axis should be a ValueAxis/NumberAxis and a CategoryAxis, they can be in either order depending on if you want a horizontal or vertical bar chart.
        Parameters:
        xAxis - The x axis to use.
        yAxis - The y axis to use.
        See Also:
        BarChart(Axis, Axis)
      • BarChartFX

        public BarChartFX​(Axis<X> xAxis,
                          Axis<Y> yAxis,
                          ObservableList<XYChart.Series<X,​Y>> data)
        Construct a new bar chart with the given axis and data. The two axis should be a ValueAxis/NumberAxis and a CategoryAxis, they can be in either order depending on if you want a horizontal or vertical bar chart.
        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:
        BarChart(Axis, Axis, ObservableList)
    • Method Detail

      • 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.