Charts & Visualization · jdashboardUI 23.5 · B4J / JavaFX
Grouped multi-series bars with legend, colors, gradient, configurable spacing and per-series values.
The image shown on this page is a documentation reference visual. It is not intended to be a pixel-perfect screenshot; the real result depends on size, theme, colors and data.
Highlights
- PNG export
- Configurable animation
- Configurable grid / axes
- Gradients
- Configurable title
- Click interaction
- Multiple series
When to use it
Grouped multi-series bars with legend, colors, gradient, configurable spacing and per-series values.
Designer Properties
| Property | Type | Default | Description |
|---|---|---|---|
| BarColors | String | #FF6C5CE7;#FF00CEC9;#FF55EFC4;#FFFDCB6E;#FFD63031;#FF0984E3;#FFFAB1A0;#FF74B9FF;#FFA29BFE;#FF81ECEC |
Modern fresh colors for the bars (separated by semicolons, format #AARRGGBB) |
| ShowMarker | Boolean | True |
Shows the values above each bar |
| MarkerText | String | API Calls |
|
| Animate | Boolean | True |
|
| Duration | Int | 1000 |
Duration in milliseconds |
| SeriesNames | String | Serie1;Serie2;Serie3;Serie4;Serie5;Serie6;Serie7;Serie8;Serie9;Serie10 |
Names of the series |
| UseGradient | Boolean | False |
Use a gradient fill for the bars |
| ValueSuffix | String | `` | Suffix for bar values (e.g., %, $, etc.) |
| ShowGrid | Boolean | False |
Shows or hides the horizontal grid lines |
| GridColor | Color | 0xFF64748B |
Color of the horizontal grid lines |
| GridInterval | Float | 0 |
Interval between grid lines (0 for auto 4 steps) |
| GridTextColor | Color | 0xFF64748B |
Color of the grid Y-axis labels |
| GridTextBold | Boolean | False |
Set to True to make the Y-axis text bold |
Creation and lifecycle
Private JMultiBarChart1 As JMultiBarChart
JMultiBarChart1.Initialize(Me, "JMultiBarChart1")
JMultiBarChart1.AddToParent(Root, 20dip, 20dip, 640dip, 360dip)
Working example
Dim X As List
X.Initialize2(Array As String("Q1", "Q2", "Q3", "Q4"))
Dim A As List
A.Initialize2(Array As Double(20, 35, 45, 60))
Dim B As List
B.Initialize2(Array As Double(28, 42, 40, 72))
Dim Series As List
Series.Initialize
Series.Add(A)
Series.Add(B)
JMultiBarChart1.setData(X, Series)
JMultiBarChart1.Legend = Array As String("2025", "2026")
Normalized B4X properties
Compatible public getX/setX accessors are presented as normal B4X properties. Parameterized accessors remain documented as methods.
| Property | Access | Type |
|---|---|---|
| BarWidth | read / write | Float |
| BarSpacing | read / write | Float |
| SeriesSpacing | read / write | Float |
| ShowAxes | read / write | Boolean |
| ShowYAxisValues | read / write | Boolean |
| ShowGrid | read / write | Boolean |
| GridColor | read / write | Int |
| GridInterval | read / write | Float |
| GridTextColor | read / write | Int |
| GridTextBold | read / write | Boolean |
| TitleFont | write | B4XFont |
| TitleColor | write | Int |
| XAxisTextColor | write | Int |
| TextTitle | write | String |
| ColorsList | write | List |
| ShowValues | write | Boolean |
| Gradient | write | Boolean |
| RoundedBars | write | Boolean |
| Legend | write | List |
| ValueSuffix | write | String |
| ValuesStyle | write | B4XFont |
Events
MouseClicked
Export and rendering
When the module exposes SaveAsPNG / SavePNG, the rendered control can be saved directly to PNG. Check the returned Boolean when provided.
Source-backed notes for the analyzed version
- The API below was extracted from the actual module source.
Complete public API
Initialize(Callback As Object, EventName As String)DesignerCreateView(Base As Object, Lbl As Label, Props As Map)AddToParent(Parent As B4XView, Left As Int, Top As Int, Width As Int, Height As Int)setData(PointsX As List, ValuesMulti As List)setTitleFont(Font As B4XFont)setTitleColor(Color As Int)setXAxisTextColor(Color As Int)setTextTitle(Title As String)setColorsList(Colors As List)setShowValues(Show As Boolean)setGradient(Use As Boolean)setBarWidth(Width As Float)getBarWidth() As FloatsetBarSpacing(Spacing As Float)getBarSpacing() As FloatsetSeriesSpacing(Spacing As Float)getSeriesSpacing() As FloatsetRoundedBars(Enabled As Boolean)setLegend(Names As List)setValueSuffix(Suffix As String)SaveAsPNG(Dir As String, FileName As String, BackgroundColor As Int) As BooleansetLegendStyle(Font As B4XFont, Color As Int)setValuesStyle(Font As B4XFont)setElementRotation(v As B4XView, Angle As Float)setShowAxes(Show As Boolean)getShowAxes() As BooleansetShowYAxisValues(Show As Boolean)getShowYAxisValues() As BooleansetShowGrid(Show As Boolean)getShowGrid() As BooleansetGridColor(Color As Int)getGridColor() As IntsetGridInterval(Interval As Float)getGridInterval() As FloatsetGridTextColor(Color As Int)getGridTextColor() As IntsetGridTextBold(Bold As Boolean)getGridTextBold() As Boolean
Related components
- JBarChart
- JStackedBarChart