DwsChartRadialBar
Shows progress towards a goal as concentric rings measured against MaxValue, with a background track, a value axis around the outer ring and grouped rings for several series.
API ReferenceRadial Bar Chart
Basic radial bar chart without legend.
Show Code
RadialBarChart.razor
<DwsChartRadialBar Name='ChartDemo_Chart13' ChartData='@_radialBarChartData' Height='200' WithLegend='false'></DwsChartRadialBar>RadialBarChart.razor.cs
private readonly DwsChartRadialBarData _radialBarChartData = new()
{
DataElements =
[
new DwsChartRadialBarDataElement("Category A", 76, "#FF6384"),
new DwsChartRadialBarDataElement("Category B", 44, "#36A2EB"),
new DwsChartRadialBarDataElement("Category C", 62, "#FFCE56")
]
};Radial Bar Chart with Legend
Radial bar chart with legend enabled.
Show Code
RadialBarChart.razor
<DwsChartRadialBar Name='ChartDemo_Chart13b' ChartData='@_radialBarChartData' Height='200' WithLegend='true'></DwsChartRadialBar>RadialBarChart.razor.cs
private readonly DwsChartRadialBarData _radialBarChartData = new()
{
DataElements =
[
new DwsChartRadialBarDataElement("Category A", 76, "#FF6384"),
new DwsChartRadialBarDataElement("Category B", 44, "#36A2EB"),
new DwsChartRadialBarDataElement("Category C", 62, "#FFCE56")
]
};Radial Bar Chart (Title and Track)
Radial bar chart with a title and background track rings that show the full length of every ring.
Show Code
RadialBarChart.razor
<DwsChartRadialBar Name='ChartDemo_Chart13c' ChartData='@_radialBarChartData' Title='Progress' ShowTrack='true' Height='200' WithLegend='true'></DwsChartRadialBar>RadialBarChart.razor.cs
private readonly DwsChartRadialBarData _radialBarChartData = new()
{
DataElements =
[
new DwsChartRadialBarDataElement("Category A", 76, "#FF6384"),
new DwsChartRadialBarDataElement("Category B", 44, "#36A2EB"),
new DwsChartRadialBarDataElement("Category C", 62, "#FFCE56")
]
};Radial Bar Chart (Value Labels)
ShowValueLabels writes the percentage of every ring at its end.
Show Code
RadialBarChart.razor
<DwsChartRadialBar Name='ChartDemo_RadialBarValueLabelsChart' ChartData='@_radialBarChartData' ShowValueLabels='true' Height='200' WithLegend='false'></DwsChartRadialBar>RadialBarChart.razor.cs
private readonly DwsChartRadialBarData _radialBarChartData = new()
{
DataElements =
[
new DwsChartRadialBarDataElement("Category A", 76, "#FF6384"),
new DwsChartRadialBarDataElement("Category B", 44, "#36A2EB"),
new DwsChartRadialBarDataElement("Category C", 62, "#FFCE56")
]
};Radial Bar Chart (Color Selector)
A ColorSelector delegate picks the color of every ring, here three theme colors in turn.
Show Code
RadialBarChart.razor
<DwsChartRadialBar Name='ChartDemo_RadialBarColorSelectorChart' ChartData='@_radialBarChartDataWithMetadata' ColorSelector='@_radialBarColorSelector' Height='200' WithLegend='true'></DwsChartRadialBar>RadialBarChart.razor.cs
private readonly DwsChartRadialBarData _radialBarChartDataWithMetadata = new()
{
DataElements =
[
new DwsChartRadialBarDataElement("Sales", 76, "#FF6384") { Metadata = new() { ["Target"] = "100", ["Region"] = "North" } },
new DwsChartRadialBarDataElement("Marketing", 44, "#36A2EB") { Metadata = new() { ["Target"] = "100", ["Region"] = "South" } },
new DwsChartRadialBarDataElement("Support", 62, "#FFCE56") { Metadata = new() { ["Target"] = "100", ["Region"] = "East" } }
]
};
private readonly Func<DwsChartRadialBarDataElement, int, string> _radialBarColorSelector =
(_, index) => (index % 3) switch { 0 => "var(--primary)", 1 => "var(--accent)", _ => "var(--secondary)" };Radial Bar Chart (No Data)
Placeholder shown when ChartData has no elements.
Show Code
RadialBarChart.razor
<DwsChartRadialBar Name='ChartDemo_Chart13e' ChartData='@_emptyRadialBarChartData' Height='200' WithLegend='false'></DwsChartRadialBar>RadialBarChart.razor.cs
private readonly DwsChartRadialBarData _emptyRadialBarChartData = new();Radial Bar Chart (Custom Legend Metadata Formatter)
LegendMetadataFormatter overrides how an element's Metadata is rendered in the legend.
Show Code
RadialBarChart.razor
<DwsChartRadialBar Name='ChartDemo_Chart13f' ChartData='@_radialBarChartDataWithMetadata' LegendMetadataFormatter='@_radialBarLegendMetadataFormatter' Height='200' WithLegend='true'></DwsChartRadialBar>RadialBarChart.razor.cs
private readonly DwsChartRadialBarData _radialBarChartDataWithMetadata = new()
{
DataElements =
[
new DwsChartRadialBarDataElement("Sales", 76, "#FF6384") { Metadata = new() { ["Target"] = "100", ["Region"] = "North" } },
new DwsChartRadialBarDataElement("Marketing", 44, "#36A2EB") { Metadata = new() { ["Target"] = "100", ["Region"] = "South" } },
new DwsChartRadialBarDataElement("Support", 62, "#FFCE56") { Metadata = new() { ["Target"] = "100", ["Region"] = "East" } }
]
};
private readonly Func<DwsChartRadialBarDataElement, string?> _radialBarLegendMetadataFormatter = element =>
element.Metadata is { Count: > 0 }
? $"({element.Metadata.Count} details) " + string.Join(" | ", element.Metadata.Select(kv => $"{kv.Key} = {kv.Value}"))
: null;Radial Bar Chart (Size Bounds)
MinWidth, MaxWidth, MinHeight and MaxHeight keep the chart between the given sizes while it follows its container.
Show Code
RadialBarChart.razor
<DwsChartRadialBar Name='ChartDemo_Chart13g' ChartData='@_radialBarChartData' MinWidth='150' MaxWidth='300' MinHeight='150' MaxHeight='300' Height='200' WithLegend='true'></DwsChartRadialBar>RadialBarChart.razor.cs
private readonly DwsChartRadialBarData _radialBarChartData = new()
{
DataElements =
[
new DwsChartRadialBarDataElement("Category A", 76, "#FF6384"),
new DwsChartRadialBarDataElement("Category B", 44, "#36A2EB"),
new DwsChartRadialBarDataElement("Category C", 62, "#FFCE56")
]
};Radial Bar Chart (Ring Thickness and Gap)
RingThickness sets the width of every ring and RingGap the space between two rings, both in pixels.
Show Code
RadialBarChart.razor
<DwsChartRadialBar Name='ChartDemo_RadialBarRingLayoutChart' ChartData='@_radialBarChartData' RingThickness='10' RingGap='4' Height='200' WithLegend='true'></DwsChartRadialBar>RadialBarChart.razor.cs
private readonly DwsChartRadialBarData _radialBarChartData = new()
{
DataElements =
[
new DwsChartRadialBarDataElement("Category A", 76, "#FF6384"),
new DwsChartRadialBarDataElement("Category B", 44, "#36A2EB"),
new DwsChartRadialBarDataElement("Category C", 62, "#FFCE56")
]
};Radial Bar Chart (Many Rings)
Six rings with the background track and tooltip enabled, demonstrating the auto-shrinking ring spacing at a higher ring count.
Show Code
RadialBarChart.razor
<DwsChartRadialBar Name='ChartDemo_Chart13h' ChartData='@_manyRingsRadialBarChartData' ShowTrack='true' ShowTooltip='true' Height='200' WithLegend='true'></DwsChartRadialBar>RadialBarChart.razor.cs
private readonly DwsChartRadialBarData _manyRingsRadialBarChartData = new()
{
DataElements =
[
new("Ring 1", 90, "#FF6384"), new("Ring 2", 78, "#36A2EB"), new("Ring 3", 65, "#FFCE56"),
new("Ring 4", 52, "#4BC0C0"), new("Ring 5", 40, "#9966FF"), new("Ring 6", 25, "#FF9F40")
]
};Radial Bar Chart (Single Ring, KPI Style)
A single thick ring with its value label, suited to a standalone completion/progress KPI tile.
Show Code
RadialBarChart.razor
<DwsChartRadialBar Name='ChartDemo_Chart13i' ChartData='@_singleRingRadialBarChartData' RingThickness='20' ShowTrack='true' ShowValueLabels='true' Height='200' WithLegend='false'></DwsChartRadialBar>RadialBarChart.razor.cs
private readonly DwsChartRadialBarData _singleRingRadialBarChartData = new()
{
DataElements = [new DwsChartRadialBarDataElement("Completion", 82, "var(--success)")]
};Radial Bar Chart (Custom MaxValue, No Track)
MaxValue='200' rescales the 100% mark for non-percentage data, with the background track disabled.
Show Code
RadialBarChart.razor
<DwsChartRadialBar Name='ChartDemo_Chart13j' ChartData='@_customMaxRadialBarChartData' MaxValue='200' ShowTrack='false' ShowValueLabels='true' Height='200' WithLegend='true'></DwsChartRadialBar>RadialBarChart.razor.cs
private readonly DwsChartRadialBarData _customMaxRadialBarChartData = new()
{
DataElements = [new("Revenue Goal", 145, "#5B8FF9"), new("Stretch Goal", 90, "#61DDAA")]
};Radial Bar Chart (Value Axis Formatter)
ValueAxisFormatter sets the text of the axis values. Here the rings are hours of a working day: MaxValue 8 and a formatter that appends the unit.
Show Code
RadialBarChart.razor
<DwsChartRadialBar Name='ChartDemo_RadialAxisHours' Title='Working day' ChartData='@_radialAxisHoursData' MaxValue='8'
ValueAxisFormatter='@_radialHoursFormatter' Height='260' WithLegend='true' />RadialBarChart.razor.cs
// A delegate kept in a field: a lambda written in the markup would be new with every render.
private static readonly Func<double, string> _radialHoursFormatter = value => $"{value:0} h";
private readonly DwsChartRadialBarData _radialAxisHoursData = new()
{
DataElements = [new("Focus time", 5.5, "#FF6384"), new("Meetings", 2, "#36A2EB"), new("Reviews", 3.25, "#FFCE56")]
};Radial Bar Chart (Value Axis Tick Count)
ValueAxisTickCount sets the approximate number of ticks; the steps are rounded to readable values.
Show Code
RadialBarChart.razor
<DwsChartRadialBar Name='ChartDemo_RadialAxisSeries' Title='Goals 2025 / 2026' SeriesData='@_radialAxisSeriesData' ValueAxisTickCount='6' Height='260' />RadialBarChart.razor.cs
private readonly DwsChartSeriesData _radialAxisSeriesData = new DwsChartSeriesData(["Sales", "Support", "Quality"])
.AddSeries("2025", [72, 55, 88])
.AddSeries("2026", [90, 64, 75]);Series: Radial Bar Chart (Grouped Rings)
Each category is a group of rings, one ring per series in the series' color; the category names stand at the start of their group.
Show Code
RadialBarChart.razor
<DwsChartRadialBar Name='ChartDemo_SeriesRadialBar' Title='Goals reached, 2025 and 2026' SeriesData='@_goalSeriesData' Height='300' />RadialBarChart.razor.cs
private readonly DwsChartSeriesData _goalSeriesData = new DwsChartSeriesData(["Sales", "Support", "Quality"])
.AddSeries("2025", [72, 55, 88])
.AddSeries("2026", [84, 67, 93]);Interface-Description
| Name | Typ | Parameters | Description |
|---|---|---|---|
| ExportSvgAsync | Task<string?> | All six charts (also DwsChartDoughnut and DwsChartPolarArea). A picture of the chart as it is on screen, as SVG markup: the drawing with the theme's colours and the fonts written into it, the title, the legend and the HTML texts drawn in where they stand, on a rectangle in the colour of the surface the chart lies on. Its size is the chart's size on screen in CSS pixels. Null when there is no picture (not interactive, no data, hidden). Not exported: a tooltip that happens to be open is left out; a label cut off with an ellipsis on screen is written in full; CSS transforms on marks (a hover effect) are not carried over. | |
| DownloadSvgAsync | Task | string? fileName | All six charts. Downloads the picture of ExportSvgAsync() as an .svg file. Null names the file after the chart's title, else its Name. |
| DownloadPngAsync | Task | string? fileName, double scale | All six charts. Downloads the picture as a .png file, scale times the chart's size on screen (2 is sharp on a high-density screen and in print; at most 8). Null names the file after the chart's title, else its Name. Text is drawn in the fonts installed on the device: a web font of the page is not available to the picture. |
| Name | Typ | Default | Description |
|---|---|---|---|
| Width | int? | null | Chart width in pixels. If null, component width is determined by layout/container. |
| Height | int? | null | Chart height in pixels. If null, component height is determined by layout/container. |
| WithLegend | bool | true | When true, chart legend is rendered. |
| ShowDataTable | bool | false | Shows the chart data as a table under the drawing. The same table, a one-line summary and an accessible name for the drawing are always rendered for screen readers (Pie, Bar, Line, Area, Radar, RadialBar). |
| ChartData | DwsChartPieData? / DwsChartBarData? / DwsChartLineData? / DwsChartAreaData? / DwsChartRadarData? / DwsChartRadialBarData? | null | Strongly typed data source for each chart component (pie/bar/line/area/radar/radialbar). |
| Title | string? | null | DwsChartPie/DwsChartBar/DwsChartLine/DwsChartArea/DwsChartRadar/DwsChartRadialBar only. Optional title rendered above the chart. |
| ShowTooltip | bool | true | DwsChartPie/DwsChartBar/DwsChartLine/DwsChartArea/DwsChartRadar/DwsChartRadialBar only. Shows a floating tooltip while hovering a slice/bar/point/ring. |
| ShowValueLabels | bool | true | DwsChartBar/DwsChartLine/DwsChartArea/DwsChartRadar/DwsChartRadialBar only. Shows each bar's/point's/ring's raw value or percentage as a label. A radial bar chart with a single ring shows its percentage large in the middle. |
| ColorSelector | Func<TDataElement, int, string>? | null | DwsChartPie/DwsChartBar/DwsChartLine/DwsChartArea/DwsChartRadar/DwsChartRadialBar only. Per-element color override for slices/bars/points/rings/legend; falls back to the element's Color when not set. |
| LegendMetadataFormatter | Func<TDataElement, string?>? | null | DwsChartPie/DwsChartBar/DwsChartLine/DwsChartArea/DwsChartRadar/DwsChartRadialBar only. Formats an element's Metadata for display in the legend/tooltip; defaults to joining "key: value" pairs. |
| MaxValue | double | 100 | DwsChartRadialBar only. The value each ring is measured against (its 100% mark). |
| ShowTrack | bool | true | DwsChartRadialBar only. Renders a faint full-circle track behind each ring's arc. |
| RingThickness | double | 14 | DwsChartRadialBar only. Stroke width of each ring, in SVG units on a 200x200 viewBox. |
| RingGap | double | 6 | DwsChartRadialBar only. Gap between adjacent rings, in SVG units. |
| MinWidth / MaxWidth / MinHeight / MaxHeight | int? | null | DwsChartRadialBar only. Additional min/max sizing bounds applied alongside Width/Height. |
| SeriesData | DwsChartSeriesData? | null | All six charts. Categories with one or more named series (DwsChartSeries: Name, Color / CustomColor, Values by position or ValuesByCategory). When it holds a series it is drawn instead of ChartData: one line (DwsChartLine), area (DwsChartArea), group or stack of bars (DwsChartBar) or polygon (DwsChartRadar) per series on shared axes; a ring per series, outermost first (DwsChartPie); a group of rings per category (DwsChartRadialBar). A null / NaN value is no value. The flat ChartData list keeps working and renders as before. |
| AllowSeriesToggle | bool | true | With SeriesData: the legend entries are toggle buttons that show or hide their series (click, Enter, Space); the axis follows the visible series. |
| ConstantSizeLabels | bool? | null (on) | All six charts. Draws value, percentage, axis and category labels as HTML over the drawing, at one readable size at any chart width, instead of SVG text that scales with the drawing. Null: on with SeriesData, off for a flat ChartData list (whose SVG labels keep the classes dws-chart-value-label / dws-chart-percentage-label). |
| EmptyContent | RenderFragment? | null | DwsChartPie/DwsChartRadar/DwsChartRadialBar. Shown instead of the default "no data" state when there is nothing to draw (not while loading). |
| IsLoading | bool | false | DwsChartPie/DwsChartRadar/DwsChartRadialBar. Shows the loading state (spinner and message) instead of the drawing, e.g. while the page fetches the data. |
| Caption | string? | null | DwsChartPie/DwsChartRadar/DwsChartRadialBar. A sentence under the chart (<p class="dws-chart-caption">) - the takeaway or the source; the drawing's aria-describedby points at it. |
| ShowValueAxis | bool | true | DwsChartRadialBar only. Draws a value axis around the outer ring: tick marks and values for the scale from 0 to MaxValue in round steps, from 12 o'clock clockwise like the rings (MaxValue itself falls on 0 and is left out). The rings move inwards to make room. Hidden from assistive technology; the values stay in the rings' accessible names and the data table. |
| ValueAxisTickCount | int | 5 | DwsChartRadialBar with ShowValueAxis. Approximate number of ticks of the value axis, MaxValue included; the steps are rounded (1, 2, 2.5, 5 times a power of ten). |
| ValueAxisFormatter | Func<double, string>? | null | DwsChartRadialBar with ShowValueAxis. Formats the values of the value axis; null writes compact numbers ("1.2K"). Pass a method or a delegate kept in a field. |
| Name | Typ | Description |
|---|---|---|
| OnItemSelected | EventCallback<string> | Triggered when a chart segment/bar/point is selected. Returns the selected item key/label. |
| OnRingClick | EventCallback<DwsChartRadialBarItemEventArgs> | DwsChartRadialBar only. Triggered when a ring is clicked. |
| OnRingPointerEnter | EventCallback<DwsChartRadialBarItemEventArgs> | DwsChartRadialBar only. Triggered when the pointer enters a ring. |
| OnRingPointerLeave | EventCallback<DwsChartRadialBarItemEventArgs> | DwsChartRadialBar only. Triggered when the pointer leaves a ring. |
| OnLegendItemClick | EventCallback<DwsChartBarItemEventArgs> / EventCallback<DwsChartPieItemEventArgs> / EventCallback<DwsChartLineItemEventArgs> / EventCallback<DwsChartAreaItemEventArgs> / EventCallback<DwsChartRadarItemEventArgs> / EventCallback<DwsChartRadialBarItemEventArgs> | DwsChartPie/DwsChartBar/DwsChartLine/DwsChartArea/DwsChartRadar/DwsChartRadialBar only. Triggered when a legend row is clicked. |
| OnSeriesToggle | EventCallback<DwsChartSeriesToggleEventArgs> | With SeriesData: raised after the legend showed or hid a series (SeriesIndex, Series, Visible). The click, pointer and legend events of every chart carry SeriesIndex and SeriesName (0 and null for a flat list). |
| Name | Typ | Default | Description |
|---|---|---|---|
| Element | ElementReference | The associated web component. May be null if accessed before the component is rendered. | |
| ComponentGuid | Guid | Unique identifier for the component. | |
| TypeString | string | The name of the component type, obtained from reflection. | |
| Authorized_RegisterEnabled | bool | false | Indicates whether this component is enabled through a permission registry. |
| Authorized_RegisterSelected | bool | false | Indicates whether this component is selected in permission selection mode. |
| GetInitializedState | bool | false | Returns whether the component is initialized. |
| GetRenderModeState | DwsRenderMode | Returns the current render mode. | |
| GetComponentState | DwsComponentStateType | Returns the current component state. | |
| GetIsInteractiveState | bool | false | Returns whether the component is interactive. |
| GetIsPrerenderingState | bool | false | Returns whether the component is prerendering. |
| GetComponentLoadingState | bool | false | Returns whether the component is loading. |
| IsFormBusy | bool | false | Whether the DwsForm (or DwsFormBusyRegion) around the component is locked because its submit handler is running. The state itself is the cascaded FormBusyState (IDwsFormBusyState). |
| Name | Typ | Parameters | Description |
|---|---|---|---|
| DebugInfo | void | Logs debug information about the component. | |
| UpdateState | void | Updates the component's state and triggers StateHasChanged. | |
| UpdateStateAsync | Task | Asynchronously updates the component's state and triggers StateHasChanged. | |
| Dispose | void | Disposes the component and releases resources. | |
| FocusAsync | ValueTask | bool containedInScrollableList | Sets focus to the component's element. |
| Name | Typ | Default | Description |
|---|---|---|---|
| Name | string | Required unique identifier for the component within its container. | |
| Visible | bool | true | Determines if the component is visible in the UI. |
| Disabled | bool | false | Disables the form control, ensuring it doesn't participate in form submission. |
| ComponentNameSpace | string | The namespace for permission-based access control. | |
| PermissionKey | string? | null | A stable key that takes the place of Name in the generated permission namespace (Page.PermissionKey): the stored permission survives a rename, and components that share a key share one permission entry. Null: keyed by Name. Read once, when the component registers; an explicit ComponentNameSpace wins. |
| Class | string | Optional CSS class names. | |
| Style | string | Optional in-line styles. | |
| Tag | object | An optional user-defined object to store any additional data with the component. | |
| BackReference | DwsReference | A reference to the enclosing component. | |
| ID | string | The HTML ID attribute for the component. | |
| AdditionalAttributes | Dictionary<string, object> | Additional HTML attributes for the component's root element. | |
| IgnorePermissionChecks | bool | false | Bypasses all permission checks for this component. |
| IgnorePermissionSelection | bool | false | Ignore permission selection mode for this component. |
| IgnoreFormBusy | bool | false | Takes the component out of the submit lock of the DwsForm (or DwsFormBusyRegion) around it: IsFormBusy stays false for it. |
| Name | Typ | Description |
|---|---|---|
| OnInitializedCallbackStarted | EventCallback | Callback when OnInitialized starts. |
| OnInitializedCallback | EventCallback | Callback during OnInitialized. |
| OnInitializedCallbackCompleted | EventCallback | Callback when OnInitialized completes. |
| OnInitializedAsyncCallbackStarted | EventCallback | Callback when OnInitializedAsync starts. |
| OnInitializedAsyncCallback | EventCallback | Callback during OnInitializedAsync. |
| OnInitializedAsyncCallbackCompleted | EventCallback | Callback when OnInitializedAsync completes. |
| OnIsComponentLoadingChanged | EventCallback<bool> | Callback when IsComponentLoading changes. |
| OnCurrentRenderModeChanged | EventCallback<DwsRenderMode> | Callback when CurrentRenderMode changes. |
| OnComponentStateChanged | EventCallback<DwsComponentStateType> | Callback when ComponentState changes. |
