QCustomRadialBars
QCustomRadialBars ships in Custom Widgets Pro. The free package under GPLv3 does not include it.
A painted radial bar chart.
Concentric arcs, one per category, each sweeping in proportion to its value. The "activity rings" form: compact, reads at a glance, and unlike a pie it compares values that do NOT sum to a whole.
QPainter only, NO QtCharts (see docs/design/mui-charts-gap.md). Angles come from the shared _chart_axis polar helpers, so this winds the same way as QCustomRadarChart and QCustomRadialLines.
Data goes in with setBars([...]) in code, or barsCsv in Qt Designer:
barsCsv = "Move=82,Exercise=64,Stand=95"
Emits barHovered(int) and barClicked(int); -1 means "nothing".
At a glance
| Tier | Pro |
| Import | from Custom_Widgets.QCustomRadialBars import QCustomRadialBars |
| Qt Designer | Yes — drag it from the palette |
Quick start
from Custom_Widgets.QCustomRadialBars import QCustomRadialBars
widget = QCustomRadialBars()
Dark theme
Colours come from the design tokens, so the widget follows the app theme with no extra work.
Properties
Every property below is settable in code and in Qt Designer.
| Property | Type | Default |
|---|---|---|
barsCsv | string | — |
colorsCsv | string | — |
maxValue | float | 100.0 |
startAngle | int | 90 |
clockwise | bool | True |
thickness | int | 18 |
spacing | int | 6 |
holeRatio | float | 0.35 |
rounded | bool | True |
showTrack | bool | True |
showLabels | bool | True |
showValues | bool | True |
trackColor | color | #e2e8f0 |
labelColor | color | #0f172a |
Signals
| Signal |
|---|
barClicked(int) |
barHovered(int) |
Methods
| Method | Description |
|---|---|
barAt(pos) | Index of the ring under a point, or -1. |
barClicked(...) | Bar clicked. |
barColor(index) | Bar color. |
barCount() | Bar count. |
barHovered(...) | Bar hovered. |
bars() | Bars. |
barsCsv(*args, **kwargs) | Bars csv. |
clearBars() | Clear the bars. |
clockwise(*args, **kwargs) | Clockwise. |
colorsCsv(*args, **kwargs) | Colors csv. |
fractionFor(index) | 0..1 of the maximum. Values above the maximum are clamped so a bar |
holeRatio(*args, **kwargs) | Hole ratio. |
labelColor(*args, **kwargs) | Label color. |
maxValue(*args, **kwargs) | Max value. |
maximum() | Maximum. |
ringRect(index) | Bounding rect of ring index, outermost first. |
rounded(*args, **kwargs) | Rounded. |
setBars(bars) | Set the bars. |
showLabels(*args, **kwargs) | Show the labels. |
showTrack(*args, **kwargs) | Show the track. |
showValues(*args, **kwargs) | Show the values. |
spacing(*args, **kwargs) | Spacing. |
startAngle(*args, **kwargs) | Start the angle. |
thickness(*args, **kwargs) | Thickness. |
trackColor(*args, **kwargs) | Track color. |
Theming
Colours come from the design tokens, so they follow the active theme. Roles used: accent, surface-muted, on-surface.
See Design tokens.
Runnable example
A complete app using this widget lives at examples/PySide6/QCustomRadialBars/main.py.
Related
QCustomAreaChart · QCustomBarChart · QCustomBeeswarm · QCustomBubbleChart · QCustomCandlestickChart · QCustomCompass · QCustomCompassDial · QCustomDivergingBarChart