Charts & Visualization · jdashboardUI 23.5 · B4J / JavaFX
Multiple line series with legend, optional fill, curves, colors and axis/grid styling.
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
- Configurable title
- Click interaction
- Multiple series
When to use it
Multiple line series with legend, optional fill, curves, colors and axis/grid styling.
Designer Properties
| Property | Type | Default | Description |
|---|---|---|---|
| LineColors | String | #FF6C5CE7;#FF00CEC9;#FF55EFC4;#FFFDCB6E;#FFD63031;#FF0984E3;#FFFAB1A0;#FF74B9FF;#FFA29BFE;#FF81ECEC |
Colors of the lines (separated by semicolons, format #AARRGGBB) |
| ShowMarker | Boolean | True |
Shows the values above each point |
| 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 |
| ShowFill | Boolean | True |
Shows or hides the fill under the chart lines |
| ValueSuffix | String | `` | Suffix for point values (e.g., %, $, etc.) |
| SmoothCurves | Boolean | False |
Use cubic bezier curves instead of straight lines. |
| 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 JMultiLineChart1 As JMultiLineChart
JMultiLineChart1.Initialize(Me, "JMultiLineChart1")
JMultiLineChart1.AddToParent(Root, 20dip, 20dip, 640dip, 360dip)
Working example
Dim X As List
X.Initialize2(Array As String("Mon", "Tue", "Wed", "Thu"))
Dim A As List
A.Initialize2(Array As Double(12, 25, 18, 40))
Dim B As List
B.Initialize2(Array As Double(20, 18, 35, 44))
Dim Series As List
Series.Initialize
Series.Add(A)
Series.Add(B)
JMultiLineChart1.setData(X, Series)
JMultiLineChart1.Legend = Array As String("Web", "Mobile")
Normalized B4X properties
Compatible public getX/setX accessors are presented as normal B4X properties. Parameterized accessors remain documented as methods.
| Property | Access | Type |
|---|---|---|
| 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 |
| TextTitle | write | String |
| TitleColor | write | Int |
| XAxisTextColor | write | Int |
| Colors | write | List |
| ShowValues | write | Boolean |
| ShowFill | write | Boolean |
| Legend | write | List |
| Suffix | write | String |
| LegendFont | write | B4XFont |
| LegendTextColor | write | Int |
| ValuesFont | write | B4XFont |
| XAxisFont | write | B4XFont |
| Curves | write | Boolean |
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)setTextTitle(Title As String)setTitleColor(Color As Int)setXAxisTextColor(Color As Int)setColors(Colors As List)setShowValues(Show As Boolean)setShowFill(Show As Boolean)setLegend(Names As List)setSuffix(Suffix As String)SaveAsPNG(Dir As String, FileName As String, BackgroundColor As Int) As BooleansetLegendFont(Font As B4XFont)setLegendTextColor(Color As Int)setValuesFont(Font As B4XFont)setXAxisFont(Font As B4XFont)setCurves(Curves As Boolean)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
- JLineChart
- JRadarChart