Radial Chart Card
Card type:
radialChart

The radial chart card displays a radial bar chart from tabular data. Radial charts are ideal for showing progress, completion rates, or comparing values in a circular format, such as task completion, or performance metrics.
In addition to the common parameters the radialChart card has the following configuration options:
Name | Type | Required | Default | Description |
---|---|---|---|---|
value | list of dict | Yes | — | The data to be plotted. Each dict represents a data point. |
fillCard | bool | No | false | When set to True , the chart will fill the entire card space including the header area. When False (default), the chart will be positioned below the header. |
label_override | dict | No | — | Optional: pretty labels for data series. |
chart_options | dict | Yes | — | Chart configuration options. See table below. |
Chart Options
Name | Type | Required | Default | Description |
---|---|---|---|---|
nameKey | str | Yes | — | The property in each dict to use for the name of the bars. |
dataKey | str | Yes | — | The property in each dict to use for the data value of the bars. |
fillKey | str | No | — | The property in each dict to use for the fill color of the bars. |
innerRadius | number or str | No | "30%" | Inner radius of the chart (e.g., 30 or “30%”). |
outerRadius | number or str | No | "90%" | Outer radius of the chart (e.g., 110 or “110%”). |
startAngle | number | No | 0 | Starting angle in degrees. n.b. 0 degrees is pointing to the right i.e. 3’o’clock. |
endAngle | number | No | 360 | Ending angle in degrees. n.b. 0 degrees is pointing to the right i.e. 3’o’clock. |
defaultColors | ”monochrome” or “multicolor” | No | "monochrome" | Fallback color scheme if no color is provided in the data. |
fontSize | str | No | (auto) | Font size for labels/tooltips. (if not set, this scales with the card size). |
showLegend | bool | No | false | Whether to show the legend below the chart. Cannot be used with showCentralText. |
margin | dict | No | {top: 15, right: 15, bottom: 15, left: 15} | Chart margins. |
background | bool | No | true | Whether to show background bars. |
cornerRadius | number | No | 0 | Corner radius of the bars. |
showGrid | bool | No | false | Whether to show the polar grid. |
gridType | ”polygon” or “circle” | No | "circle" | Type of grid to display. |
showCentralText | bool | No | false | Whether to show text in the center of the chart. Cannot be used with showLegend. |
centralTextValue | str | No | — | Text to display in the center. If not provided and showCentralText is true, shows the total sum of all values. |
centralTextLabel | str | No | — | Label to show below the main central text. |
Legend vs Central Text
- Legend vs Central Text:
showLegend
andshowCentralText
cannot be used simultaneously. If both are enabled, the legend will be disabled.
Grid Types
"circle"
: Circular grid pattern (default)"polygon"
: Polygonal grid pattern
Examples
Simple Radial Chart
This example shows a basic radial chart for browser usage statistics.
import polars as pl
# Create some data
df = pl.DataFrame({
"browser": ["chrome", "safari", "firefox", "edge", "other"],
"visitors": [275, 200, 187, 173, 90],
})
# Convert to the format expected by the radial chart
data = df.to_dicts()
# Override labels
label_override = {
"visitors": {"label": "Visitors"},
"chrome": {"label": "Chrome"},
"safari": {"label": "Safari"},
"firefox": {"label": "Firefox"},
"edge": {"label": "Edge"},
"other": {"label": "Other"},
}
datacards.publish.card(
type='radialChart',
value=data,
label="Browser Usage",
chart_options={
"nameKey": "browser",
"dataKey": "visitors",
},
label_override=label_override,
logic_view_size=(4,2),
)

Radial Chart with Grid
This example shows a radial chart with a circular grid for better visual reference.
import polars as pl
# Create some data
df = pl.DataFrame({
"browser": ["chrome", "safari", "firefox", "edge", "other"],
"visitors": [275, 200, 187, 173, 90],
})
# Convert to the format expected by the radial chart
data = df.to_dicts()
# Override labels
label_override = {
"visitors": {"label": "Visitors"},
"chrome": {"label": "Chrome"},
"safari": {"label": "Safari"},
"firefox": {"label": "Firefox"},
"edge": {"label": "Edge"},
"other": {"label": "Other"},
}
datacards.publish.card(
type='radialChart',
value=data,
label="Browser Usage with Grid",
chart_options={
"nameKey": "browser",
"background": False,
"dataKey": "visitors",
"showGrid": True,
"gridType": "circle",
"innerRadius": "30%",
"outerRadius": "100%",
},
label_override=label_override,
logic_view_size=(4,2),
)

Radial Chart with Custom Colors
This example demonstrates how to specify custom colors for each bar using the fillKey
option.
import polars as pl
# Create some data
df = pl.DataFrame({
"task": ["Design", "Development", "Testing", "Deployment", "Documentation"],
"progress": [85, 70, 90, 45, 60],
"color": ["#10b981", "#3b82f6", "#f59e0b", "#ef4444", "#8b5cf6"],
})
# Convert to the format expected by the radial chart
data = df.to_dicts()
# Override labels
label_override = {
"progress": {"label": "Progress (%)"},
"Design": {"label": "Design"},
"Development": {"label": "Development"},
"Testing": {"label": "Testing"},
"Deployment": {"label": "Deployment"},
"Documentation": {"label": "Documentation"},
}
datacards.publish.card(
type='radialChart',
value=data,
label="Project Progress",
chart_options={
"nameKey": "task",
"dataKey": "progress",
"fillKey": "color",
"innerRadius": "40%",
"outerRadius": "80%",
"showGrid": True,
"gridType": "circle",
},
label_override=label_override,
logic_view_size=(4,2),
)

Radial Chart with Custom Angles
This example shows a radial chart with custom start and end angles, creating a semi-circular chart. N.b. that the start and end angles are relative to the 0 degrees being the right i.e. 3’o’clock.
import polars as pl
# Create some data
df = pl.DataFrame({
"metric": ["Speed", "Accuracy", "Efficiency", "Quality"],
"score": [85, 92, 78, 88],
})
# Convert to the format expected by the radial chart
data = df.to_dicts()
# Override labels
label_override = {
"score": {"label": "Score"},
"Speed": {"label": "Speed"},
"Accuracy": {"label": "Accuracy"},
"Efficiency": {"label": "Efficiency"},
"Quality": {"label": "Quality"},
}
datacards.publish.card(
type='radialChart',
value=data,
label="Performance Metrics",
chart_options={
"nameKey": "metric",
"dataKey": "score",
"startAngle": 180,
"endAngle": 0,
"innerRadius": "20%",
"outerRadius": "100%",
"defaultColors": "multicolor",
},
label_override=label_override,
logic_view_size=(4,2),
)

Radial Chart with Central Text - Goal Progress
This example demonstrates a radial chart with central text showing percentage of goal reached.
import polars as pl
# Create some data
df = pl.DataFrame({
"goal": ["Sales", "Marketing", "Development", "Support"],
"achieved": [85, 92, 78, 88],
"target": [100, 100, 100, 100],
})
# Calculate percentage of goal reached
df = df.with_columns([
(pl.col("achieved") / pl.col("target") * 100).alias("percentage")
])
# Convert to the format expected by the radial chart
data = df.to_dicts()
# Override labels
label_override = {
"percentage": {"label": "Goal Progress (%)"},
"Sales": {"label": "Sales"},
"Marketing": {"label": "Marketing"},
"Development": {"label": "Development"},
"Support": {"label": "Support"},
}
# Calculate overall goal progress
overall_progress = round(df["percentage"].mean(), 1)
datacards.publish.card(
type='radialChart',
value=data,
label="Goal Progress",
chart_options={
"nameKey": "goal",
"dataKey": "percentage",
"showCentralText": True,
"centralTextValue": f"{overall_progress}%",
"centralTextLabel": "Overall Goal",
"innerRadius": "40%",
"outerRadius": "80%",
"defaultColors": "multicolor",
"showLegend": False,
},
label_override=label_override,
logic_view_size=(4,2),
)
