Package com.oorian.apexcharts
Class ApexChart
java.lang.Object
com.oorian.html.Element<ApexChart>
- Direct Known Subclasses:
ApexAreaChart,ApexBarChart,ApexBoxPlotChart,ApexBubbleChart,ApexCandlestickChart,ApexColumnChart,ApexDonutChart,ApexHeatmapChart,ApexLineChart,ApexPieChart,ApexPolarAreaChart,ApexRadarChart,ApexRadialBarChart,ApexRangeAreaChart,ApexRangeBarChart,ApexScatterChart,ApexTreemapChart
ApexCharts chart component.
Supports all ApexCharts chart types: line, area, bar, column, pie, donut, radialBar, scatter, bubble,
heatmap, treemap, radar, polarArea, rangeBar, rangeArea, candlestick, boxPlot, and funnel.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddSeries(ApexSeries series) Adds a data series to the chart.protected voidsetAnimations(boolean enabled) Sets whether animations are enabled.setBoxPlotColors(String upperColor, String lowerColor) Sets the boxplot chart colors for upper and lower quartile ranges.setCandlestickColors(String upColor, String downColor) Sets the candlestick chart colors for upward and downward movements.setCandlestickWickUseFillColor(boolean useFillColor) Sets whether candlestick wicks should use the fill color.setCategories(String... categories) Sets the categories (X-axis labels).setChartHeight(int height) Sets the chart height in pixels.setChartWidth(int width) Sets the chart width in pixels.Sets the chart colors.Sets the curve type for line/area charts.setDataLabels(boolean show) Sets whether to show data labels on the chart.setForegroundColor(String color) Sets the foreground color for all text elements (axes, legend, labels).setFunnel(boolean funnel) Sets whether to display the chart as a funnel.setGrid(boolean show) Sets whether to show the grid.setHeatmapColorScale(String minColor, String maxColor) Sets the heatmap color scale range.setHeatmapDistributed(boolean distributed) Sets whether heatmap values are distributed (each cell has its own color).setHeatmapEnableShades(boolean enableShades) Sets whether heatmap shades are enabled.setLegend(boolean show) Sets whether to show the legend.setLegendLabelColor(String color) Sets the legend label color.setLegendPosition(String position) Sets the legend position.setPieData(String[] labels, Number[] values) Sets pie/donut chart data with labels.setStacked(boolean stacked) Sets whether the chart is stacked.setStackedPercent(boolean percent) Sets whether the stacked chart shows percentages.setStrokeLineCap(String lineCap) Sets the stroke line cap style.setStrokeWidth(int width) Sets the stroke width for line-based charts.Sets the chart title.setTitleAlign(String align) Sets the title alignment.setToolbar(boolean show) Sets whether to show the toolbar.setTreemapDistributed(boolean distributed) Sets whether treemap values are distributed (each cell has its own color).setTreemapEnableShades(boolean enableShades) Sets whether treemap shades are enabled.Sets the chart type.setXAxisLabelColor(String color) Sets the X-axis label color.setXAxisTitle(String title) Sets the X-axis title.setYAxisLabelColor(String color) Sets the Y-axis label color.setYAxisTitle(String title) Sets the Y-axis title.setZoom(boolean enabled) Sets whether zoom is enabled.voidupdatePieData(boolean animate, Number... values) Updates pie/donut/radialBar chart data dynamically with animation control.voidupdatePieData(Number... values) Updates pie/donut/radialBar chart data dynamically.voidupdateSeries(boolean animate, ApexSeries... newSeries) Updates the chart series data dynamically with animation control.voidupdateSeries(ApexSeries... newSeries) Updates the chart series data dynamically.Methods inherited from class com.oorian.apexcharts.ApexChartsComponent
callMethod, getComponentType, getElementContent, getOptions, setHeight, setOption, setWidth, updateSeriesInternalMethods inherited from class com.oorian.html.Element
addAttribute, addAttribute, addAttribute, addAttribute, addElement, addLineBreak, addLineOfText, addLineOfText, addLineOfText, addParagraph, addParagraph, addSpacer, addText, addText, addText, addText, assignId, containsElement, containsElement, create, dispatchEvent, dispatchEvent, dispatchEvent, dispatchEvent, equals, excludeId, executeJs, executeJs, executeJs, getAccept, getAllElements, getAncestor, getAttribute, getAttributes, getComponent, getDir, getElement, getElementById, getElementCount, getElementCount, getElements, getElements, getElementsByComponentName, getElementsByTagName, getHtml, getHtml, getId, getInnerHtml, getInnerHtml, getIs, getItemId, getItemProp, getItemRef, getItemType, getLang, getNextSibling, getPage, getParent, getPart, getPrevSibling, getSlot, getTagName, getTextContent, getUrl, hasAttribute, hasElements, hidden, insertElement, isChildOf, isClosedTag, isCreated, isDescendantOf, isDescendantOf, isInitialized, isItemScope, isTranslate, onCallback, onCreated, onElementAdded, onElementRemoved, onHashChange, onHidden, onInitialized, onJsReturn, onPageLoaded, onPageUnloaded, onRefresh, onRemovedFromPage, onShown, onUpdated, onUserEvent, prewrite, recreate, refresh, refresh, registerAddition, registerListener, registerListener, registerListener, registerListener, registerListener, registerListener, registerListener, registerSubtraction, registerUpdate, removeAllElements, removeAttribute, removeAttribute, removeElement, removeElement, removeFromParent, requestCallback, requestCallback, requestCallback, requestCallback, resetId, scrollTo, scrollToBottom, scrollToTop, self, sendCommand, sendUpdate, setAccept, setComponent, setDir, setDir, setElement, setId, setIs, setItemId, setItemProp, setItemRef, setItemScope, setItemType, setLang, setOnError, setOnLoad, setPage, setParent, setPart, setSlot, setTagName, setText, setText, setText, setText, setTranslate, shown, toString, unregisterListener, update, updateAttributes
-
Field Details
-
TYPE_LINE
- See Also:
-
TYPE_AREA
- See Also:
-
TYPE_BAR
- See Also:
-
TYPE_COLUMN
- See Also:
-
TYPE_PIE
- See Also:
-
TYPE_DONUT
- See Also:
-
TYPE_RADIAL_BAR
- See Also:
-
TYPE_SCATTER
- See Also:
-
TYPE_BUBBLE
- See Also:
-
TYPE_HEATMAP
- See Also:
-
TYPE_TREEMAP
- See Also:
-
TYPE_RADAR
- See Also:
-
TYPE_POLAR_AREA
- See Also:
-
TYPE_RANGE_BAR
- See Also:
-
TYPE_RANGE_AREA
- See Also:
-
TYPE_CANDLESTICK
- See Also:
-
TYPE_BOX_PLOT
- See Also:
-
CURVE_SMOOTH
- See Also:
-
CURVE_STRAIGHT
- See Also:
-
CURVE_STEPLINE
- See Also:
-
LEGEND_TOP
- See Also:
-
LEGEND_RIGHT
- See Also:
-
LEGEND_BOTTOM
- See Also:
-
LEGEND_LEFT
- See Also:
-
ALIGN_LEFT
- See Also:
-
ALIGN_CENTER
- See Also:
-
ALIGN_RIGHT
- See Also:
-
-
Constructor Details
-
ApexChart
public ApexChart()Creates a new chart with the default type (line). -
ApexChart
Creates a new chart with the specified type.- Parameters:
type- The chart type.
-
-
Method Details
-
setType
Sets the chart type.- Parameters:
type- The chart type (use TYPE_* constants).- Returns:
- This chart for method chaining.
-
setTitle
Sets the chart title.- Parameters:
title- The chart title.- Returns:
- This chart for method chaining.
-
setTitleAlign
Sets the title alignment.- Parameters:
align- The alignment ("left", "center", "right").- Returns:
- This chart for method chaining.
-
setChartHeight
Sets the chart height in pixels.- Parameters:
height- The height in pixels.- Returns:
- This chart for method chaining.
-
setChartWidth
Sets the chart width in pixels.- Parameters:
width- The width in pixels.- Returns:
- This chart for method chaining.
-
setCurve
Sets the curve type for line/area charts.- Parameters:
curve- The curve type (use CURVE_* constants).- Returns:
- This chart for method chaining.
-
setStacked
Sets whether the chart is stacked.- Parameters:
stacked- True for stacked, false for grouped.- Returns:
- This chart for method chaining.
-
setStackedPercent
Sets whether the stacked chart shows percentages.- Parameters:
percent- True for 100% stacked.- Returns:
- This chart for method chaining.
-
setToolbar
Sets whether to show the toolbar.- Parameters:
show- True to show toolbar.- Returns:
- This chart for method chaining.
-
setZoom
Sets whether zoom is enabled.- Parameters:
enabled- True to enable zoom.- Returns:
- This chart for method chaining.
-
setAnimations
Sets whether animations are enabled.- Parameters:
enabled- True to enable animations.- Returns:
- This chart for method chaining.
-
setDataLabels
Sets whether to show data labels on the chart.- Parameters:
show- True to show data labels.- Returns:
- This chart for method chaining.
-
setLegend
Sets whether to show the legend.- Parameters:
show- True to show legend.- Returns:
- This chart for method chaining.
-
setLegendPosition
Sets the legend position.- Parameters:
position- The position ("top", "right", "bottom", "left").- Returns:
- This chart for method chaining.
-
setGrid
Sets whether to show the grid.- Parameters:
show- True to show grid.- Returns:
- This chart for method chaining.
-
setXAxisTitle
Sets the X-axis title.- Parameters:
title- The axis title.- Returns:
- This chart for method chaining.
-
setYAxisTitle
Sets the Y-axis title.- Parameters:
title- The axis title.- Returns:
- This chart for method chaining.
-
setCategories
Sets the categories (X-axis labels).- Parameters:
categories- The categories.- Returns:
- This chart for method chaining.
-
addSeries
Adds a data series to the chart.- Parameters:
series- The series to add.- Returns:
- This chart for method chaining.
-
setColors
Sets the chart colors.- Parameters:
colors- The colors (CSS color values).- Returns:
- This chart for method chaining.
-
setPieData
Sets pie/donut chart data with labels.- Parameters:
labels- The labels.values- The values.- Returns:
- This chart for method chaining.
-
setFunnel
Sets whether to display the chart as a funnel. Used with TYPE_BAR to create funnel/pyramid charts.- Parameters:
funnel- True for funnel mode.- Returns:
- This chart for method chaining.
-
setCandlestickColors
Sets the candlestick chart colors for upward and downward movements.- Parameters:
upColor- The color for upward (bullish) candles.downColor- The color for downward (bearish) candles.- Returns:
- This chart for method chaining.
-
setCandlestickWickUseFillColor
Sets whether candlestick wicks should use the fill color.- Parameters:
useFillColor- True to use fill color for wicks.- Returns:
- This chart for method chaining.
-
setBoxPlotColors
Sets the boxplot chart colors for upper and lower quartile ranges.- Parameters:
upperColor- The color for the upper quartile range.lowerColor- The color for the lower quartile range.- Returns:
- This chart for method chaining.
-
setHeatmapDistributed
Sets whether heatmap values are distributed (each cell has its own color).- Parameters:
distributed- True for distributed coloring.- Returns:
- This chart for method chaining.
-
setHeatmapEnableShades
Sets whether heatmap shades are enabled.- Parameters:
enableShades- True to enable shades.- Returns:
- This chart for method chaining.
-
setHeatmapColorScale
Sets the heatmap color scale range.- Parameters:
minColor- The color for minimum values.maxColor- The color for maximum values.- Returns:
- This chart for method chaining.
-
setTreemapDistributed
Sets whether treemap values are distributed (each cell has its own color).- Parameters:
distributed- True for distributed coloring.- Returns:
- This chart for method chaining.
-
setTreemapEnableShades
Sets whether treemap shades are enabled.- Parameters:
enableShades- True to enable shades.- Returns:
- This chart for method chaining.
-
setStrokeWidth
Sets the stroke width for line-based charts.- Parameters:
width- The stroke width in pixels.- Returns:
- This chart for method chaining.
-
setStrokeLineCap
Sets the stroke line cap style.- Parameters:
lineCap- The line cap style ("butt", "round", "square").- Returns:
- This chart for method chaining.
-
setForegroundColor
Sets the foreground color for all text elements (axes, legend, labels). Useful for dark-themed charts.- Parameters:
color- The CSS color value.- Returns:
- This chart for method chaining.
-
setXAxisLabelColor
Sets the X-axis label color.- Parameters:
color- The CSS color value.- Returns:
- This chart for method chaining.
-
setYAxisLabelColor
Sets the Y-axis label color.- Parameters:
color- The CSS color value.- Returns:
- This chart for method chaining.
-
setLegendLabelColor
Sets the legend label color.- Parameters:
color- The CSS color value.- Returns:
- This chart for method chaining.
-
updateSeries
Updates the chart series data dynamically. Use this method to update the chart with new data after it has been rendered.- Parameters:
newSeries- The new series data.
-
updateSeries
Updates the chart series data dynamically with animation control.- Parameters:
animate- Whether to animate the update.newSeries- The new series data.
-
updatePieData
Updates pie/donut/radialBar chart data dynamically.- Parameters:
values- The new data values.
-
updatePieData
Updates pie/donut/radialBar chart data dynamically with animation control.- Parameters:
animate- Whether to animate the update.values- The new data values.
-
initialize
protected void initialize()- Overrides:
initializein classcom.oorian.html.Element<ApexChart>
-