Charts & Visualization · jdashboardUI 23.5 · B4J / JavaFX
Financial OHLC candlestick chart for open, high, low and close values per period.
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
When to use it
Financial OHLC candlestick chart for open, high, low and close values per period.
Designer Properties
This module does not declare Designer Properties.
Creation and lifecycle
Private JCandlestickChart1 As JCandlestickChart
JCandlestickChart1.Initialize(Me, "JCandlestickChart1")
JCandlestickChart1.AddToParent(Root, 20dip, 20dip, 640dip, 360dip)
Working example
Dim L As List
L.Initialize2(Array As String("Mon", "Tue", "Wed", "Thu"))
Dim O As List
O.Initialize2(Array As Double(101, 108, 104, 112))
Dim H As List
H.Initialize2(Array As Double(112, 115, 113, 120))
Dim Lo As List
Lo.Initialize2(Array As Double(98, 103, 100, 108))
Dim C As List
C.Initialize2(Array As Double(108, 105, 111, 118))
JCandlestickChart1.SetData(L, O, H, Lo, C)
Normalized B4X properties
Compatible public getX/setX accessors are presented as normal B4X properties. Parameterized accessors remain documented as methods.
| Property | Access | Type |
|---|---|---|
| TextTitle | write | String |
| ShowGrid | write | Boolean |
| ShowAxes | write | Boolean |
| ShowYAxisValues | write | Boolean |
| ShowValues | write | Boolean |
| Suffix | write | String |
| BarSpacing | write | Float |
Events
No public events are declared in the analyzed version.
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
- SetData requires matching Open / High / Low / Close lists for each label.
Complete public API
Initialize(Callback As Object, EventName As String)AddToParent(Parent As B4XView, Left As Int, Top As Int, Width As Int, Height As Int)DesignerCreateView(Base As Object, Lbl As Label, Props As Map)setTextTitle(Value As String)setShowGrid(Value As Boolean)setShowAxes(Value As Boolean)setShowYAxisValues(Value As Boolean)setShowValues(Value As Boolean)setAnimation(Enabled As Boolean, DurationMs As Int)SetTheme(TextColor As Int, GridColor As Int, BackgroundColor As Int)setSuffix(Value As String)SaveAsPNG(Dir As String, FileName As String) As BooleanSetData(Labels As List, OpenValues As List, HighValues As List, LowValues As List, CloseValues As List) As BooleansetBarSpacing(Value As Float)
Related components
- JChartRenderer
- JTimeLine