Module xaos.ui.plot

Class HistogramChartFX<X extends Number,​Y extends Number>

    • Constructor Detail

      • HistogramChartFX

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

        public HistogramChartFX​(ValueAxis<X> xAxis,
                                ValueAxis<Y> yAxis,
                                ObservableList<XYChart.Series<X,​Y>> data)
        Construct a new histogram chart with the given data.
        Parameters:
        xAxis - The X axis.
        yAxis - The Y axis.
        data - Data to included in the chart
    • Method Detail

      • of

        public static HistogramChartFX<Number,​Number> of​(List<Double> data,
                                                               int bars,
                                                               String seriesName)
        Quick way of creating a histogram chart showing the given data.
        Parameters:
        data - The data list to be charted.
        bars - The desired number of histogram bars.
        seriesName - The name of the XYChart.Series created from the given data.
        Returns:
        A AreaChartFX chart.
      • of

        public static HistogramChartFX<Number,​Number> of​(List<Double> data,
                                                               double minVal,
                                                               double maxVal,
                                                               int bars,
                                                               String seriesName)
        Quick way of creating a histogram chart showing the given data.
        Parameters:
        data - The data list to be charted.
        minVal - Minimum data value.
        maxVal - Maximum data value.
        bars - The desired number of histogram bars.
        seriesName - The name of the XYChart.Series created from the given data.
        Returns:
        A AreaChartFX chart.
      • seriesOf

        public static XYChart.Series<Number,​Number> seriesOf​(List<Double> data,
                                                                   int bars,
                                                                   String seriesName)
        Quick way of creating a histogram chart series from the given data.
        Parameters:
        data - The data list to be charted.
        bars - The desired number of histogram bars.
        seriesName - The name of the XYChart.Series created from the given data.
        Returns:
        A AreaChartFX chart.
      • seriesOf

        public static XYChart.Series<Number,​Number> seriesOf​(List<Double> data,
                                                                   double minVal,
                                                                   double maxVal,
                                                                   int bars,
                                                                   String seriesName)
        Quick way of creating a histogram chart series from the given data.
        Parameters:
        data - The data list to be charted.
        minVal - Minimum data value.
        maxVal - Maximum data value.
        bars - The desired number of histogram bars.
        seriesName - The name of the XYChart.Series created from the given data.
        Returns:
        A AreaChartFX chart.
      • getBarGap

        public double getBarGap()
        Returns:
        The number of pixels between histogram bars.
        See Also:
        barGapProperty()
      • setBarGap

        public void setBarGap​(double barGap)
        Parameters:
        barGap - The number of pixels between histogram bars.
        See Also:
        barGapProperty()
      • 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.