Public Sub Initialize(CallbackObject As Object, EventNameValue As String)
Prepare the instance before its other methods.
ELEVATEUI · B4A · XUI
Compare multi-axis profiles, competencies and quality scores.
Charts & visualizations
Compare multi-axis profiles, competencies and quality scores.
Animated conceptual demonstration, not an exact Android control screenshot.
Compare a product or employee across multiple equally scaled indicators and show strengths versus gaps.
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
Dim chart As UIRadarChart
chart.Initialize(Me, "Skills")
chart.AddToParent(Root, 12dip, 20dip, 100%x - 24dip, 260dip)
chart.SetAxes(L(Array As Object("Calidad","Velocidad","Costo","Soporte","Diseño")))
chart.setMaximum(100)
chart.setAnimation(True, 850)
chart.AddSeries("Actual", L(Array As Object(85,70,75,90,65)), 0xFF8B5CF6, 0x558B5CF6)
chart.AddSeries("Objetivo", L(Array As Object(90,80,80,95,78)), 0xFF06B6D4, 0x5506B6D4)
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
Private Sub Skills_VertexClick(SeriesName As String, Index As Int)
Log(SeriesName & " / eje " & Index)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause(UserClosed As Boolean)
End Sub
17 audited signatures
Public Sub Initialize(CallbackObject As Object, EventNameValue As String)
Prepare the instance before its other methods.
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.
Public Sub DesignerCreateView(Base As Object, Lbl As Label, Props As Map)
Invoked automatically by the B4A Visual Designer; do not call manually.
Public Sub SetAxes(Labels As List)
Use SetAxes for its named operation; follow its exact signature.
Public Sub AddSeries(Name As String, Values As List, LineColor As Int, FillColor As Int)
Use AddSeries for its named operation; follow its exact signature.
Public Sub setTextTitle(Value As String)
Update text title at runtime when this setting changes.
Public Sub setShowGrid(Value As Boolean)
Update show grid at runtime when this setting changes.
Public Sub setShowAxes(Value As Boolean)
Update show axes at runtime when this setting changes.
Public Sub setShowYAxisValues(Value As Boolean)
Update show yaxis values at runtime when this setting changes.
Public Sub setShowValues(Value As Boolean)
Update show values at runtime when this setting changes.
Public Sub setSuffix(Value As String)
Update suffix at runtime when this setting changes.
Public Sub setGradient(Value As Boolean)
Update gradient at runtime when this setting changes.
Public Sub setMaximum(Value As Float)
Update maximum at runtime when this setting changes.
Public Sub setAnimation(Enabled As Boolean, DurationMs As Int)
Update animation at runtime when this setting changes.
Public Sub SetTheme(TextColor As Int, GridColor As Int, BackgroundColor As Int)
Use SetTheme for its named operation; follow its exact signature.
Public Sub SaveAsPNG(Dir As String, FileName As String) As Boolean
Use SaveAsPNG for its named operation; follow its exact signature.
Returns: Boolean
Public Sub VertexClick(SeriesName As String, Index As Int) As Boolean
Use VertexClick for its named operation; follow its exact signature.
Original catalog note: Raises the existing callback only for a valid series and vertex.
Returns: Boolean
#DesignerProperty: Key: Animate, DisplayName: Animate, FieldType: Boolean, DefaultValue: True#DesignerProperty: Key: Duration, DisplayName: Animation Duration (ms), FieldType: Int, DefaultValue: 800#DesignerProperty: Key: ShowValues, DisplayName: Show Values, FieldType: Boolean, DefaultValue: False#DesignerProperty: Key: ValueSuffix, DisplayName: Value Suffix, FieldType: String, DefaultValue:#DesignerProperty: Key: UseGradient, DisplayName: Gradient Fill, FieldType: Boolean, DefaultValue: False#DesignerProperty: Key: GridLines, DisplayName: Grid Lines, FieldType: Int, DefaultValue: 4Initialize with Me and the event prefix Demo, then add the following handler to your B4A module. Names and arguments come from the library declaration.
Raised when the user taps the control; use it to trigger a real action.
B4A handler signature with Demo prefix
Private Sub Demo_VertexClick(SeriesName As String, Index As Int)
Log("VertexClick")
End Sub
For code-created controls use Initialize(Me, "Demo") when that signature exists; for Designer controls set the event name there. Replace Demo with the actual prefix.
Public mBase As B4XView