Technical Support
🟢 Online now
Hello 👋

How can we help you today?
Contact on WhatsApp
B4X Store
jdashboardUI / Indicators, Progress & Gauges / jGauge
Indicators, Progress & Gauges

jGauge

Speedometer-like half/full circular gauge with needle, colored ranges, prefix/suffix and min/max.

Search all jdashboardUI docs
Source
jdashboardUI.b4xlib · Public API only
Store language: en
Reference visual
Documentation reference created from the real component type. It is not an exact screenshot.
REFERENCE
jGauge REFERENCE 72

Indicators, Progress & Gauges · jdashboardUI 23.5 · B4J / JavaFX

Speedometer-like half/full circular gauge with needle, colored ranges, prefix/suffix and min/max.

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

  • Configurable animation
  • Animated value

When to use it

Speedometer-like half/full circular gauge with needle, colored ranges, prefix/suffix and min/max.

Designer Properties

Property Type Default Description
MinValue Float 0
MaxValue Float 100
IndicatorLength Int 20
CenterColor Color #FF2C3144
BackgroundColor Color 0xFFFFFFFF
IndicatorColor Color 0xFF000000
PrefixText String ``
SuffixText String °
Duration Int 3000 Milliseconds
GaugeType String Half Circle
TextColor Color 0xFF000000
TextSize Int 16

Creation and lifecycle

Private jGauge1 As jGauge

jGauge1.Initialize(Me, "jGauge1")
jGauge1.AddToParent(Root, 20dip, 20dip, 360dip, 260dip, "", "%", 0xFF2C3144, 0xFFFFFFFF, 0xFF111827, 18, False, 20dip)

Working example

Dim Ranges As List
Ranges.Initialize
Ranges.Add(jGauge1.CreateRange(0, 40, 0xFF22C55E))
Ranges.Add(jGauge1.CreateRange(40, 75, 0xFFF59E0B))
Ranges.Add(jGauge1.CreateRange(75, 100, 0xFFEF4444))

jGauge1.SetMinAndMax(0, 100)
jGauge1.SetRanges(Ranges)
jGauge1.CurrentValue = 64

Normalized B4X properties

Compatible public getX/setX accessors are presented as normal B4X properties. Parameterized accessors remain documented as methods.

Property Access Type
CurrentValue read / write Float

Events

No public events are declared in the analyzed version.

Export and rendering

This component does not expose a public PNG export function in the analyzed version.

Source-backed notes for the analyzed version

  • SetRanges accepts GaugeRange objects created with CreateRange. Gauge type can be Half Circle or Full Circle.

Complete public API

  • Initialize(Callback As Object, EventName As String)
  • DesignerCreateView(Base As Object, Lbl As Label, Props As Map)
  • AddToParent(Parent As B4XView, l As Int, t As Int, w As Int, h As Int,Preffix As String,suffix As String,ColorCenter As Int,ColorBackground As Int,ColorTex As Int,SizeText As Float, IsFullCicle As Boolean,IndicatorHeight As Int)
  • SetMinAndMax(NewMinValue As Float, NewMaxValue As Float)
  • SetRanges(Ranges As List)
  • CreateRange(LowValue As Float, HighValue As Float, Color As Int) As GaugeRange
  • setCurrentValue(v As Float)
  • getCurrentValue() As Float
  • JGaugeProgress
  • JCircularProgressBar