B4X Store

ELEVATEUI · B4A · XUI

UIBubbleChart

Display observations with X, Y and a third magnitude represented by bubble size.

78 modules 1,780 APIs

Charts & visualizations

What it solves

Display observations with X, Y and a third magnitude represented by bubble size.

Animated conceptual demonstration, not an exact Android control screenshot.

13 methods0 Designer0 events

When to use this module

In an analytics screen, choose this visualization when the user needs to compare the values represented by its axes or series.

Before integrating, examine its methods, events and Designer options.

B4A integration examples

Tutorials are based on existing project examples or audited APIs. Check each example’s prerequisites; B4A compilation is not claimed.

Chart implementation from documented B4A example
Existing documentation example charts-registry.json Not B4A-compiled

Review required libraries, Designer views and input data before compiling in B4A.

' Ejemplo autocontenido para la Activity principal de B4A.
' Habilitar las bibliotecas XUI y ElevateUI.
Sub Process_Globals
    Private xui As XUI
End Sub

Sub Globals
    Private Root As B4XView
End Sub

Sub Activity_Create(FirstTime As Boolean)
    Root = xui.CreatePanel("")
    Activity.AddView(Root, 0, 0, 100%x, 100%y)
    Root.Color = 0xFFF8FAFC
    Dim chart As UIBubbleChart
    chart.Initialize(Me, "Segments")
    chart.AddToParent(Root, 12dip, 20dip, 100%x - 24dip, 260dip)
    chart.setTextTitle("Clientes: valor y frecuencia")
    chart.setAnimation(True, 900)
    Dim ok As Boolean = chart.SetData( _
        L(Array As Object("A","B","C","D")), _
        L(Array As Object(12,30,48,65)), _
        L(Array As Object(45,20,65,32)), _
        L(Array As Object(8,15,22,12)), _
        L(Array As Object(0xFF6366F1,0xFF06B6D4,0xFFF59E0B,0xFF10B981)))
    If ok = False Then Log("Datos de burbujas inválidos")
End Sub

' Convierte un array de Object en una lista B4A.
' Necesario para las firmas que aceptan List.
Private Sub L(Values() As Object) As List
    Dim Result As List
    Result.Initialize
    Result.AddAll(Values)
    Return Result
End Sub

Sub Activity_Resume
End Sub

Sub Activity_Pause(UserClosed As Boolean)
End Sub

Public methods reference

13 audited signatures

Public Sub Initialize(Callback As Object, EventName As String)

Prepare the instance before its other methods.

Callback As ObjectEventName As String
Public Sub AddToParent(Parent As B4XView, Left As Int, Top As Int, Width As Int, Height As Int)

Add this view to a parent container using the supplied bounds and options.

Parent As B4XViewLeft As IntTop As IntWidth As IntHeight As Int
Public Sub DesignerCreateView(Base As Object, Lbl As Label, Props As Map)

Invoked automatically by the B4A Visual Designer; do not call manually.

Base As ObjectLbl As LabelProps As Map
Public Sub setTextTitle(Value As String)

Update text title at runtime when this setting changes.

Value As String
Public Sub setShowGrid(Value As Boolean)

Update show grid at runtime when this setting changes.

Value As Boolean
Public Sub setShowAxes(Value As Boolean)

Update show axes at runtime when this setting changes.

Value As Boolean
Public Sub setShowYAxisValues(Value As Boolean)

Update show yaxis values at runtime when this setting changes.

Value As Boolean
Public Sub setShowValues(Value As Boolean)

Update show values at runtime when this setting changes.

Value As Boolean
Public Sub setAnimation(Enabled As Boolean, DurationMs As Int)

Update animation at runtime when this setting changes.

Enabled As BooleanDurationMs As Int
Public Sub SetTheme(TextColor As Int, GridColor As Int, BackgroundColor As Int)

Use SetTheme for its named operation; follow its exact signature.

TextColor As IntGridColor As IntBackgroundColor As Int
Public Sub setSuffix(Value As String)

Update suffix at runtime when this setting changes.

Value As String
Public Sub SaveAsPNG(Dir As String, FileName As String) As Boolean

Use SaveAsPNG for its named operation; follow its exact signature.

Dir As StringFileName As String

Returns: Boolean

Public Sub SetData(Labels As List, XValues As List, YValues As List, Sizes As List, Colors1 As List) As Boolean

Use SetData for its named operation; follow its exact signature.

Original catalog note: Bubble area is proportional to Size. Equal sizes produce a scatter plot.

Labels As ListXValues As ListYValues As ListSizes As ListColors1 As List

Returns: Boolean

Designer · 0

No custom Designer properties were found in the audited API.

Public events and how to implement them · 0

No public callback events are declared in the catalog. You can still handle B4A events for controls inserted inside it.

Public fields, constants and types

Public mBase As B4XView
Source: ElevateUI public API catalog; tutorials cross-checked against ElevateUI(6).b4xlib. Visualizations are illustrative; sample code requires B4A compilation.