Class HTMLHistogramChart

All Implemented Interfaces:
HTMLConvertable

public class HTMLHistogramChart extends HTMLChart
The HTMLHistogramChart class represents an HTML-based histogram chart with optional Cumulative Distribution Function (CDF) visualization. Extends HTMLChart to provide histogram-specific configurations using the ApexCharts library.
Author:
Alexey Glazyrin
  • Constructor Details

    • HTMLHistogramChart

      public HTMLHistogramChart()
      Constructs a new HTMLHistogramChart instance with default settings.
    • HTMLHistogramChart

      public HTMLHistogramChart(BarVisualSetContainer visualSetContainer)
      Constructs a new HTMLHistogramChart instance from a bar visual set container.
      Parameters:
      visualSetContainer - container holding bar visual sets and configurations
    • HTMLHistogramChart

      public HTMLHistogramChart(IAbstractChartVisualSet... visualSets)
      Constructs a new HTMLHistogramChart instance from individual visual sets.
      Parameters:
      visualSets - array of visual sets defining histogram data and appearance
  • Method Details

    • title

      public HTMLHistogramChart title(String title)
      Sets the title of the chart.
      Overrides:
      title in class HTMLChart
      Parameters:
      title - the title text
      Returns:
      this HTMLHistogramChart instance for method chaining
    • titleColor

      public HTMLHistogramChart titleColor(Color color)
      Sets the color of the chart title.
      Overrides:
      titleColor in class HTMLChart
      Parameters:
      color - the color of the title
      Returns:
      this HTMLHistogramChart instance for method chaining
    • titleFont

      public HTMLHistogramChart titleFont(FontDescriptor fontDescriptor)
      Sets the font of the chart title.
      Overrides:
      titleFont in class HTMLChart
      Parameters:
      fontDescriptor - the font descriptor to use for the title
      Returns:
      this HTMLHistogramChart instance for method chaining
    • titleAlignment

      public HTMLHistogramChart titleAlignment(com.amalgamasimulation.desktop.html.charts.ApexOptions.ApexAlign alignment)
      Sets the alignment of the chart title.
      Overrides:
      titleAlignment in class HTMLChart
      Parameters:
      alignment - the alignment of the title
      Returns:
      this HTMLHistogramChart instance for method chaining
    • relativeWidth

      public HTMLHistogramChart relativeWidth(double width)
      Sets the relative width of the chart container as a percentage.
      Overrides:
      relativeWidth in class HTMLChart
      Parameters:
      width - the width as a percentage (e.g., 0.5 for 50%)
      Returns:
      this HTMLHistogramChart instance for method chaining
    • relativeHeight

      public HTMLHistogramChart relativeHeight(double height)
      Sets the relative height of the chart container as a percentage.
      Overrides:
      relativeHeight in class HTMLChart
      Parameters:
      height - the height as a percentage (e.g., 0.5 for 50%)
      Returns:
      this HTMLHistogramChart instance for method chaining
    • cdfLineColor

      public HTMLHistogramChart cdfLineColor(Color color)
      Sets the color of the Cumulative Distribution Function (CDF) line.
      Parameters:
      color - the color for the CDF line
      Returns:
      this HTMLHistogramChart instance for method chaining
    • cdfLineWidth

      public HTMLHistogramChart cdfLineWidth(int width)
      Sets the stroke width of the CDF line in pixels.
      Parameters:
      width - the line width in pixels
      Returns:
      this HTMLHistogramChart instance for method chaining
    • cdfVisible

      public HTMLHistogramChart cdfVisible(boolean cdfVisible)
      Controls visibility of the CDF line overlay.
      Parameters:
      cdfVisible - true to show CDF line, false to hide
      Returns:
      this HTMLHistogramChart instance for method chaining
    • font

      public HTMLHistogramChart font(FontDescriptor fontDescriptor)
      Sets the font of the chart.
      Overrides:
      font in class HTMLChart
      Parameters:
      fontDescriptor - the font descriptor to use for the chart
      Returns:
      this HTMLHistogramChart instance for method chaining
    • preRenderJS

      protected void preRenderJS(Set<String> outStrings)
      Overrides:
      preRenderJS in class HTMLChart
    • copy

      public HTMLChart copy(Map<String,String> stringsSubstitutionMap)
      Description copied from interface: HTMLConvertable
      Creates a deep copy of this HTMLConvertable element, preserving the element's structure while substituting text content using the provided translation mapping.
      Specified by:
      copy in interface HTMLConvertable
      Overrides:
      copy in class HTMLChart
      Parameters:
      stringsSubstitutionMap - a map where keys are original text strings (as collected by HTMLConvertable.toHTML(Set)) and values are their translations. During copying, any encountered text content present in this map will be replaced with its translated version.
      Returns:
      a new independent copy of this HTMLConvertable instance with translated content