B4X Store

ELEVATEUI · B4A · XUI

UIChartRenderer

Shared rendering support for specialized charts.

78 modules 1,780 APIs

Charts & visualizations

What it solves

Shared rendering support for specialized charts.

Animated conceptual demonstration, not an exact Android control screenshot.

19 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
    ' Uso avanzado: se recomienda UIHorizontalBarChart en aplicaciones.
    Dim base As B4XView = xui.CreatePanel("")
    Root.AddView(base, 12dip, 20dip, 100%x - 24dip, 260dip)
    Dim renderer As UIChartRenderer
    renderer.Initialize(0) ' 0 = barras horizontales
    renderer.Create(base)
    renderer.SetTitle("Volumen por equipo")
    Dim rows As List
    rows.Initialize
    rows.Add(CreateMap("label":"A","value":35,"color":0xFF8B5CF6))
    rows.Add(CreateMap("label":"B","value":61,"color":0xFF06B6D4))
    renderer.SetRows(rows, L(Array As Object("A","B")))
    renderer.SetAnimation(True, 700)
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

19 audited signatures

Public Sub Initialize(ChartKind As Int)

Prepare the instance before its other methods.

Original catalog note: Internal shared renderer. 0: horizontal bars, 1: bubbles, 2: candles, 3: radar, 4: pie, 5: diverging bars.

ChartKind As Int
Public Sub Create(Base As B4XView)

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

Base As B4XView
Public Sub Resize(Width As Float, Height As Float)

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

Width As FloatHeight As Float
Public Sub SetRows(Data As List, AxisLabels As List)

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

Data As ListAxisLabels As List
Public Sub SetTitle(Value As String)

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

Value As String
Public Sub SetGrid(Value As Boolean)

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

Value As Boolean
Public Sub SetAxes(Value As Boolean)

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

Value As Boolean
Public Sub SetRounded(Value As Boolean)

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

Value As Boolean
Public Sub SetGradient(Value As Boolean)

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

Value As Boolean
Public Sub SetGridLevels(Value As Int)

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

Value As Int
Public Sub SetSpacing(Value As Float)

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

Value As Float
Public Sub SetXAxisValues(Value As Boolean)

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

Value As Boolean
Public Sub SetYAxisValues(Value As Boolean)

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

Value As Boolean
Public Sub SetValues(Value As Boolean)

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

Value As Boolean
Public Sub SetSuffix(Value As String)

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

Value As String
Public Sub SetMaximum(Value As Float)

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

Value As Float
Public Sub SetColors(Text1 As Int, Grid As Int, BackgroundColor As Int)

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

Text1 As IntGrid As IntBackgroundColor As Int
Public Sub SetAnimation(Enabled As Boolean, DurationMs As Int)

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

Enabled As BooleanDurationMs As Int
Public Sub SavePNG(Dir As String, FileName As String) As Boolean

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

Dir As StringFileName As String

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.