Class HistogramChart

All Implemented Interfaces:
IVerticalGuidelineOwner<IBarChartVisualSet,BarVisualSetContainer>

public final class HistogramChart extends AbstractBarChart
A chart is a GUI component based on JavaFX's XYChart class that can be used to conveniently draw numeric and statistical data. All charts are designed to be compatible with Eclipse RCP applications and SWT framework. A Histogram Chart is used to show statistical data as histograms by categories.
Author:
Aleksey Kirillov
  • Field Details

  • Constructor Details

    • HistogramChart

      public HistogramChart(IChartEnvironment chartEnvironment)
      Constructs a Histogram Chart with a set of default parameters: no title, stack BarsLayout, etc.
      Parameters:
      chartEnvironment - parent subtype of IChartEnvironment, that is a layer between the parent composite and this chart
    • HistogramChart

      public HistogramChart(IChartEnvironment chartEnvironment, String title)
      Constructs a Histogram Chart with a given title and default BarsLayout stack-layout.
      Parameters:
      chartEnvironment - parent subtype of IChartEnvironment, that is a layer between the parent composite and this chart
      title - chart title i.e. label written above the chart
  • Method Details

    • getXAxis

      public BarChartCategoryXAxis getXAxis()
      Description copied from class: Chart
      Returns the X-axis of this chart.
      Specified by:
      getXAxis in class Chart<IBarChartVisualSet,BarVisualSetContainer>
      Returns:
      the X-axis of this chart
    • getYAxis

      public BarChartNumericYAxis getYAxis()
      Description copied from class: Chart
      Returns the Y-axis of this chart.
      Specified by:
      getYAxis in class Chart<IBarChartVisualSet,BarVisualSetContainer>
      Returns:
      the Y-axis of this chart
    • getChartInternal

      protected com.amalgamasimulation.charts.internals.charts.HistogramChartInternal getChartInternal()
      Overrides:
      getChartInternal in class AbstractBarChart
    • getLegend

      public Legend<Object> getLegend()
      Description copied from class: AbstractBarChart
      Returns the Legend currently shown on this chart.
      Specified by:
      getLegend in class AbstractBarChart
      Returns:
      the Legend currently shown on this chart
    • setCDFLabelsVisible

      public HistogramChart setCDFLabelsVisible(boolean cdfLabelsVisible)
      Specifies whether the labels of CDF (cumulative distribution function) should be drawn. Redraws this chart if visibility is changed.
      Parameters:
      cdfLabelsVisible - new CDF visibility
      Returns:
      reference to this object
      See Also:
    • setCDFLineVisible

      public HistogramChart setCDFLineVisible(boolean cdfVisible)
      Specifies whether the line of CDF (cumulative distribution function) should be drawn. Redraws this chart if visibility is changed.
      Parameters:
      cdfVisible - new CDF line visibility
      Returns:
      reference to this object
      See Also:
    • setCDFLineColor

      public HistogramChart setCDFLineColor(Color cdfLineColor)
      Sets the new color to the line of CDF (cumulative distribution function). Redraws this chart if color is changed.
      Parameters:
      cdfLineColor - new CDF line color
      Returns:
      reference to this object
      See Also:
    • setCDFLineColor

      public HistogramChart setCDFLineColor(javafx.scene.paint.Color cdfLineColor)
      Sets the new color to the line of CDF (cumulative distribution function). Redraws this chart if color is changed.
      Parameters:
      cdfLineColor - new CDF line color
      Returns:
      reference to this object
      See Also:
    • setCDFLineWidth

      public HistogramChart setCDFLineWidth(int cdfLineWidth)
      Sets the new width to the line of CDF (cumulative distribution function), in pixels. Redraws this chart if width is changed.
      Parameters:
      cdfLineWidth - new CDF line width, in pixels
      Returns:
      reference to this object
      See Also:
    • isCDFLineVisible

      public boolean isCDFLineVisible()
      Checks if the line of the CDF (cumulative distribution function) should be drawn.
      Returns:
      true if CDF line should be drawn, false otherwise
    • isCDFLabelsVisible

      public boolean isCDFLabelsVisible()
      Checks if the labels of the CDF (cumulative distribution function) should be drawn.
      Returns:
      true if CDF should be drawn, false otherwise
    • getCDFLineColor

      public javafx.scene.paint.Color getCDFLineColor()
      Returns the color of the line of CDF (cumulative distribution function).
      Returns:
      CDF line color
    • getCDFLineWidth

      public int getCDFLineWidth()
      Returns the width of the line of CDF (cumulative distribution function), in pixels.
      Returns:
      CDF line width, in pixels