Technical Support
🟢 Online now
Hello 👋

How can we help you today?
Contact on WhatsApp
B4X Store
jdashboardUI / Charts & Visualization / JPieChart
Charts & Visualization

JPieChart

Category pie chart with colors, title, suffix, theme and animation.

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
JPieChart REFERENCE

Charts & Visualization · jdashboardUI 23.5 · B4J / JavaFX

Category pie chart with colors, title, suffix, theme and animation.

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

  • PNG export
  • Configurable animation
  • Configurable grid / axes
  • Configurable title

When to use it

Category pie chart with colors, title, suffix, theme and animation.

Designer Properties

This module does not declare Designer Properties.

Creation and lifecycle

Private JPieChart1 As JPieChart

JPieChart1.Initialize(Me, "JPieChart1")
JPieChart1.AddToParent(Root, 20dip, 20dip, 640dip, 360dip)

Working example

Dim Labels As List
Labels.Initialize2(Array As String("A", "B", "C"))
Dim Values As List
Values.Initialize2(Array As Double(50, 30, 20))
Dim Colors As List
Colors.Initialize2(Array As Int(0xFF4F46E5, 0xFF06B6D4, 0xFFF59E0B))
JPieChart1.SetData(Labels, Values, Colors)
JPieChart1.TextTitle = "Distribution"

Normalized B4X properties

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

Property Access Type
TextTitle write String
Suffix write String
ShowGrid write Boolean
ShowAxes write Boolean
ShowYAxisValues write Boolean

Events

No public events are declared in the analyzed version.

Export and rendering

When the module exposes SaveAsPNG / SavePNG, the rendered control can be saved directly to PNG. Check the returned Boolean when provided.

Source-backed notes for the analyzed version

  • The API below was extracted from the actual module source.

Complete public API

  • Initialize(Callback As Object, EventName As String)
  • AddToParent(Parent As B4XView, Left As Int, Top As Int, Width As Int, Height As Int)
  • DesignerCreateView(Base As Object, Lbl As Label, Props As Map)
  • SetData(Labels As List, Values As List, Colors As List) As Boolean
  • setTextTitle(Value As String)
  • setSuffix(Value As String)
  • setShowGrid(Value As Boolean)
  • setShowAxes(Value As Boolean)
  • setShowYAxisValues(Value As Boolean)
  • setAnimation(Enabled As Boolean, DurationMs As Int)
  • SetTheme(TextColor As Int, GridColor As Int, BackgroundColor As Int)
  • SaveAsPNG(Dir As String, FileName As String) As Boolean
  • JDonutChart
  • JChartRenderer