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.
ELEVATEUI · B4A · XUI
Shared rendering support for specialized charts.
Charts & visualizations
Shared rendering support for specialized charts.
Animated conceptual demonstration, not an exact Android control screenshot.
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.
Tutorials are based on existing project examples or audited APIs. Check each example’s prerequisites; B4A compilation is not claimed.
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
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.
Public Sub Create(Base As B4XView)
Use Create for its named operation; follow its exact signature.
Public Sub Resize(Width As Float, Height As Float)
Use Resize for its named operation; follow its exact signature.
Public Sub SetRows(Data As List, AxisLabels As List)
Use SetRows for its named operation; follow its exact signature.
Public Sub SetTitle(Value As String)
Use SetTitle for its named operation; follow its exact signature.
Public Sub SetGrid(Value As Boolean)
Use SetGrid for its named operation; follow its exact signature.
Public Sub SetAxes(Value As Boolean)
Use SetAxes for its named operation; follow its exact signature.
Public Sub SetRounded(Value As Boolean)
Use SetRounded for its named operation; follow its exact signature.
Public Sub SetGradient(Value As Boolean)
Use SetGradient for its named operation; follow its exact signature.
Public Sub SetGridLevels(Value As Int)
Use SetGridLevels for its named operation; follow its exact signature.
Public Sub SetSpacing(Value As Float)
Use SetSpacing for its named operation; follow its exact signature.
Public Sub SetXAxisValues(Value As Boolean)
Use SetXAxisValues for its named operation; follow its exact signature.
Public Sub SetYAxisValues(Value As Boolean)
Use SetYAxisValues for its named operation; follow its exact signature.
Public Sub SetValues(Value As Boolean)
Use SetValues for its named operation; follow its exact signature.
Public Sub SetSuffix(Value As String)
Use SetSuffix for its named operation; follow its exact signature.
Public Sub SetMaximum(Value As Float)
Use SetMaximum for its named operation; follow its exact signature.
Public Sub SetColors(Text1 As Int, Grid As Int, BackgroundColor As Int)
Use SetColors for its named operation; follow its exact signature.
Public Sub SetAnimation(Enabled As Boolean, DurationMs As Int)
Use SetAnimation for its named operation; follow its exact signature.
Public Sub SavePNG(Dir As String, FileName As String) As Boolean
Use SavePNG for its named operation; follow its exact signature.
Returns: Boolean
No custom Designer properties were found in the audited API.
No public callback events are declared in the catalog. You can still handle B4A events for controls inserted inside it.
Public mBase As B4XView