Class HTMLHistogramChart
java.lang.Object
com.amalgamasimulation.desktop.html.HTMLTag
com.amalgamasimulation.desktop.html.charts.HTMLChart
com.amalgamasimulation.desktop.html.charts.HTMLHistogramChart
- All Implemented Interfaces:
HTMLConvertable
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
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new HTMLHistogramChart instance with default settings.HTMLHistogramChart(BarVisualSetContainer visualSetContainer) Constructs a new HTMLHistogramChart instance from a bar visual set container.HTMLHistogramChart(IAbstractChartVisualSet... visualSets) Constructs a new HTMLHistogramChart instance from individual visual sets. -
Method Summary
Modifier and TypeMethodDescriptioncdfLineColor(Color color) Sets the color of the Cumulative Distribution Function (CDF) line.cdfLineWidth(int width) Sets the stroke width of the CDF line in pixels.cdfVisible(boolean cdfVisible) Controls visibility of the CDF line overlay.Creates a deep copy of this HTMLConvertable element, preserving the element's structure while substituting text content using the provided translation mapping.font(FontDescriptor fontDescriptor) Sets the font of the chart.protected voidpreRenderJS(Set<String> outStrings) relativeHeight(double height) Sets the relative height of the chart container as a percentage.relativeWidth(double width) Sets the relative width of the chart container as a percentage.Sets the title of the chart.titleAlignment(com.amalgamasimulation.desktop.html.charts.ApexOptions.ApexAlign alignment) Sets the alignment of the chart title.titleColor(Color color) Sets the color of the chart title.titleFont(FontDescriptor fontDescriptor) Sets the font of the chart title.Methods inherited from class com.amalgamasimulation.desktop.html.charts.HTMLChart
generateScript, stacked, toHTML, xAxisTitle, xAxisValueConverter, yAxisLabelsDecimalSigns, yAxisTitleMethods inherited from class com.amalgamasimulation.desktop.html.HTMLTag
append, attr, backgroundColor, colorToRGBA, fillCopy, fontColor, fontFamily, fontSizeInPx, fontStyle, fontWeight, getAttributes, getChildren, lineHeight, marginInPx, maxHeightInPx, maxWidthInPx, paddingInPx, removeChildren, style, tag, tag, textAlignment, toCSSMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.amalgamasimulation.desktop.html.HTMLConvertable
copy, toHTML
-
Constructor Details
-
HTMLHistogramChart
public HTMLHistogramChart()Constructs a new HTMLHistogramChart instance with default settings. -
HTMLHistogramChart
Constructs a new HTMLHistogramChart instance from a bar visual set container.- Parameters:
visualSetContainer- container holding bar visual sets and configurations
-
HTMLHistogramChart
Constructs a new HTMLHistogramChart instance from individual visual sets.- Parameters:
visualSets- array of visual sets defining histogram data and appearance
-
-
Method Details
-
title
Sets the title of the chart. -
titleColor
Sets the color of the chart title.- Overrides:
titleColorin classHTMLChart- Parameters:
color- the color of the title- Returns:
- this HTMLHistogramChart instance for method chaining
-
titleFont
Sets the font of the chart title. -
titleAlignment
public HTMLHistogramChart titleAlignment(com.amalgamasimulation.desktop.html.charts.ApexOptions.ApexAlign alignment) Sets the alignment of the chart title.- Overrides:
titleAlignmentin classHTMLChart- Parameters:
alignment- the alignment of the title- Returns:
- this HTMLHistogramChart instance for method chaining
-
relativeWidth
Sets the relative width of the chart container as a percentage.- Overrides:
relativeWidthin classHTMLChart- Parameters:
width- the width as a percentage (e.g., 0.5 for 50%)- Returns:
- this HTMLHistogramChart instance for method chaining
-
relativeHeight
Sets the relative height of the chart container as a percentage.- Overrides:
relativeHeightin classHTMLChart- Parameters:
height- the height as a percentage (e.g., 0.5 for 50%)- Returns:
- this HTMLHistogramChart instance for method chaining
-
cdfLineColor
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
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
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
Sets the font of the chart. -
preRenderJS
- Overrides:
preRenderJSin classHTMLChart
-
copy
Description copied from interface:HTMLConvertableCreates a deep copy of this HTMLConvertable element, preserving the element's structure while substituting text content using the provided translation mapping.- Specified by:
copyin interfaceHTMLConvertable- Overrides:
copyin classHTMLChart- Parameters:
stringsSubstitutionMap- a map where keys are original text strings (as collected byHTMLConvertable.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
-