Class HTMLBarChart
java.lang.Object
com.amalgamasimulation.desktop.html.HTMLTag
com.amalgamasimulation.desktop.html.charts.HTMLChart
com.amalgamasimulation.desktop.html.charts.HTMLBarChart
- All Implemented Interfaces:
HTMLConvertable
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
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new HTMLBarChart instance with default settings.HTMLBarChart(BarVisualSetContainer visualSetContainer) Constructs a new HTMLBarChart instance with specified visual set container.HTMLBarChart(IBarChartVisualSet... visualSets) Constructs a new HTMLBarChart instance with specified visual sets. -
Method Summary
Modifier and TypeMethodDescriptionCreates 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.stacked(boolean stacked) Configures stacked display mode for chart elements.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.yAxisLabelsDecimalSigns(int decimalSignsCount) Configures the number of decimal places to display on Y-axis labels.Methods inherited from class com.amalgamasimulation.desktop.html.charts.HTMLChart
generateScript, toHTML, xAxisTitle, xAxisValueConverter, 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
-
HTMLBarChart
public HTMLBarChart()Constructs a new HTMLBarChart instance with default settings. -
HTMLBarChart
Constructs a new HTMLBarChart instance with specified visual set container.- Parameters:
visualSetContainer- container holding bar visual sets and configurations
-
HTMLBarChart
Constructs a new HTMLBarChart instance with specified visual sets.- Parameters:
visualSets- array of bar chart visual sets to display
-
-
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 HTMLBarChart instance for method chaining
-
titleFont
Sets the font of the chart title. -
titleAlignment
public HTMLBarChart 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 HTMLBarChart 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 HTMLBarChart 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 HTMLBarChart instance for method chaining
-
font
Sets the font of the chart. -
stacked
Configures stacked display mode for chart elements. -
yAxisLabelsDecimalSigns
Configures the number of decimal places to display on Y-axis labels.- Overrides:
yAxisLabelsDecimalSignsin classHTMLChart- 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
- 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
-