Class HTMLBarChart

All Implemented Interfaces:
HTMLConvertable

public class HTMLBarChart extends HTMLChart
The HTMLBarChart class represents an HTML-based bar chart. It extends HTMLChart and provides methods for configuring and rendering bar charts using the ApexCharts library.
Author:
Alexey Glazyrin
  • Constructor Details

    • HTMLBarChart

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

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

      public HTMLBarChart(IBarChartVisualSet... visualSets)
      Constructs a new HTMLBarChart instance with specified visual sets.
      Parameters:
      visualSets - array of bar chart visual sets to display
  • Method Details

    • title

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

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

      public HTMLBarChart 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 HTMLBarChart instance for method chaining
    • titleAlignment

      public HTMLBarChart 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 HTMLBarChart instance for method chaining
    • relativeWidth

      public HTMLBarChart 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 HTMLBarChart instance for method chaining
    • relativeHeight

      public HTMLBarChart 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 HTMLBarChart instance for method chaining
    • font

      public HTMLBarChart 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 HTMLBarChart instance for method chaining
    • stacked

      public HTMLBarChart stacked(boolean stacked)
      Configures stacked display mode for chart elements.
      Overrides:
      stacked in class HTMLChart
      Parameters:
      stacked - true to enable stacked visualization, false for grouped
      Returns:
      this HTMLBarChart instance for method chaining
    • yAxisLabelsDecimalSigns

      public HTMLBarChart yAxisLabelsDecimalSigns(int decimalSignsCount)
      Configures the number of decimal places to display on Y-axis labels.
      Overrides:
      yAxisLabelsDecimalSigns in class HTMLChart
      Parameters:
      decimalSignsCount - the number of decimal digits to display on Y-axis labels. Must be a non-negative integer
      Returns:
      this HTMLBarChart 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