DeepWorks Studios Blazor Component Library

Demo user Administrator ยท Blazor Server Library 20261206222504-6e8ff32.dirty

DwsChartLine

Shows how values change along an ordered category axis such as time: one line per series, a crosshair that finds the nearest point, value labels, and zoom and pan for long series.

API Reference

Line Chart

Basic line chart without legend.

Category ACategory BCategory C

3 values, from 20 to 50

Chart
LabelValue
Category A30
Category B50
Category C20
Show Code
LineChart.razor
<DwsChartLine Name="ChartDemo_LineChart05" ChartData="@_lineChartData" Height="200" WithLegend="false"></DwsChartLine>
LineChart.razor.cs
private readonly DwsChartLineData _lineChartData = new()
{
    DataElements =
    [
        new DwsChartLineDataElement("Category A", 30, "#FF6384"),
        new DwsChartLineDataElement("Category B", 50, "#36A2EB"),
        new DwsChartLineDataElement("Category C", 20, "#FFCE56")
    ]
};

Line Chart with Legend

Line chart with legend enabled.

Category ACategory BCategory C
Category A
Category B
Category C

3 values, from 20 to 50

Chart
LabelValue
Category A30
Category B50
Category C20
Show Code
LineChart.razor
<DwsChartLine Name="ChartDemo_LineChart06" ChartData="@_lineChartData" Height="200" WithLegend="true"></DwsChartLine>
LineChart.razor.cs
private readonly DwsChartLineData _lineChartData = new()
{
    DataElements =
    [
        new DwsChartLineDataElement("Category A", 30, "#FF6384"),
        new DwsChartLineDataElement("Category B", 50, "#36A2EB"),
        new DwsChartLineDataElement("Category C", 20, "#FFCE56")
    ]
};

Title, Grid and Value Labels

Line chart with a title, background grid, hover tooltip and per-point value labels.

Trend
Category ACategory BCategory C
Category A
Category B
Category C

3 values, from 20 to 50

Trend
LabelValue
Category A30
Category B50
Category C20
Show Code
LineChart.razor
<DwsChartLine Name="LineChartDemo_ChartGridLabels" ChartData="@_lineChartData" Title="Trend" ShowGrid="true" GridLineCount="4"
              ShowTooltip="true" ShowValueLabels="true" Height="200" WithLegend="true"></DwsChartLine>
LineChart.razor.cs
private readonly DwsChartLineData _lineChartData = new()
{
    DataElements =
    [
        new DwsChartLineDataElement("Category A", 30, "#FF6384"),
        new DwsChartLineDataElement("Category B", 50, "#36A2EB"),
        new DwsChartLineDataElement("Category C", 20, "#FFCE56")
    ]
};

Color Selector

A ColorSelector delegate picks the color of each point and legend entry; here the points alternate between the primary and the accent color.

JanFebMarApr
Jan
Delta: +5, Region: North
Feb
Delta: +20, Region: South
Mar
Delta: -30, Region: East
Apr
Delta: +20, Region: West

4 values, from 20 to 50

Chart
LabelValue
Jan30
Feb50
Mar20
Apr40
Show Code
LineChart.razor
<DwsChartLine Name="LineChartDemo_ChartColorSelector" ChartData="@_lineChartDataWithMetadata" ColorSelector="@_lineColorSelector" Height="200" WithLegend="true"></DwsChartLine>
LineChart.razor.cs
private readonly Func<DwsChartLineDataElement, int, string> _lineColorSelector =
    (_, index) => index % 2 == 0 ? "var(--primary)" : "var(--accent)";

private readonly DwsChartLineData _lineChartDataWithMetadata = new()
{
    DataElements =
    [
        new DwsChartLineDataElement("Jan", 30, "#FF6384") { Metadata = new() { ["Delta"] = "+5", ["Region"] = "North" } },
        new DwsChartLineDataElement("Feb", 50, "#36A2EB") { Metadata = new() { ["Delta"] = "+20", ["Region"] = "South" } },
        new DwsChartLineDataElement("Mar", 20, "#FFCE56") { Metadata = new() { ["Delta"] = "-30", ["Region"] = "East" } },
        new DwsChartLineDataElement("Apr", 40, "#4BC0C0") { Metadata = new() { ["Delta"] = "+20", ["Region"] = "West" } }
    ]
};

Line Chart (No Data)

Placeholder shown when ChartData has fewer than two points.

No data available

No values

Chart
LabelValue
Show Code
LineChart.razor
<DwsChartLine Name="ChartDemo_Chart08d" ChartData="@_emptyLineChartData" Height="200" WithLegend="false"></DwsChartLine>
LineChart.razor.cs
private readonly DwsChartLineData _emptyLineChartData = new();

Line Chart (Custom Legend Metadata Formatter)

LegendMetadataFormatter overrides how an element's Metadata is rendered in the legend.

JanFebMarApr
Jan
(2 details) Delta = +5 | Region = North
Feb
(2 details) Delta = +20 | Region = South
Mar
(2 details) Delta = -30 | Region = East
Apr
(2 details) Delta = +20 | Region = West

4 values, from 20 to 50

Chart
LabelValue
Jan30
Feb50
Mar20
Apr40
Show Code
LineChart.razor
<DwsChartLine Name="ChartDemo_Chart08e" ChartData="@_lineChartDataWithMetadata" LegendMetadataFormatter="@_lineLegendMetadataFormatter" Height="200" WithLegend="true"></DwsChartLine>
LineChart.razor.cs
private readonly Func<DwsChartLineDataElement, string?> _lineLegendMetadataFormatter = element =>
    element.Metadata is { Count: > 0 }
        ? $"({element.Metadata.Count} details) " + string.Join(" | ", element.Metadata.Select(kv => $"{kv.Key} = {kv.Value}"))
        : null;

private readonly DwsChartLineData _lineChartDataWithMetadata = new()
{
    DataElements =
    [
        new DwsChartLineDataElement("Jan", 30, "#FF6384") { Metadata = new() { ["Delta"] = "+5", ["Region"] = "North" } },
        new DwsChartLineDataElement("Feb", 50, "#36A2EB") { Metadata = new() { ["Delta"] = "+20", ["Region"] = "South" } },
        new DwsChartLineDataElement("Mar", 20, "#FFCE56") { Metadata = new() { ["Delta"] = "-30", ["Region"] = "East" } },
        new DwsChartLineDataElement("Apr", 40, "#4BC0C0") { Metadata = new() { ["Delta"] = "+20", ["Region"] = "West" } }
    ]
};

Line Chart (Dense Data & Enhanced Grid)

12-point series with a denser 6-line grid, stressing the higher-contrast grid lines and edge-aware value labels/tooltip at realistic density.

Monthly Signups
JanFebMarAprMayJunJulAugSepOctNovDec

12 values, from 22 to 80

Monthly Signups
LabelValue
Jan22
Feb35
Mar28
Apr47
May60
Jun52
Jul71
Aug65
Sep80
Oct58
Nov40
Dec33
Show Code
LineChart.razor
<DwsChartLine Name="ChartDemo_Chart08f" ChartData="@_denseLineChartData" Title="Monthly Signups" ShowGrid="true" GridLineCount="6"
              ShowTooltip="true" ShowValueLabels="true" Height="200" WithLegend="false"></DwsChartLine>
LineChart.razor.cs
private readonly DwsChartLineData _denseLineChartData = new()
{
    DataElements =
    [
        new DwsChartLineDataElement("Jan", 22, "#FF6384"),
        new DwsChartLineDataElement("Feb", 35, "#FF6384"),
        new DwsChartLineDataElement("Mar", 28, "#FF6384"),
        new DwsChartLineDataElement("Apr", 47, "#FF6384"),
        new DwsChartLineDataElement("May", 60, "#FF6384"),
        new DwsChartLineDataElement("Jun", 52, "#FF6384"),
        new DwsChartLineDataElement("Jul", 71, "#FF6384"),
        new DwsChartLineDataElement("Aug", 65, "#FF6384"),
        new DwsChartLineDataElement("Sep", 80, "#FF6384"),
        new DwsChartLineDataElement("Oct", 58, "#FF6384"),
        new DwsChartLineDataElement("Nov", 40, "#FF6384"),
        new DwsChartLineDataElement("Dec", 33, "#FF6384")
    ]
};

Line Chart (Long Time Series)

24 monthly points across two years, with grid and tooltip enabled to demonstrate the chart at realistic reporting length.

2-Year Trend
2024-012024-022024-032024-042024-052024-062024-072024-082024-092024-102024-112024-122025-012025-022025-032025-042025-052025-062025-072025-082025-092025-102025-112025-12

24 values, from 12 to 90

2-Year Trend
LabelValue
2024-0112
2024-0218
2024-0315
2024-0424
2024-0530
2024-0628
2024-0735
2024-0840
2024-0938
2024-1045
2024-1150
2024-1255
2025-0148
2025-0252
2025-0360
2025-0458
2025-0565
2025-0670
2025-0768
2025-0874
2025-0980
2025-1077
2025-1183
2025-1290
Show Code
LineChart.razor
<DwsChartLine Name="ChartDemo_Chart08h" ChartData="@_longSeriesLineChartData" Title="2-Year Trend" ShowGrid="true" GridLineCount="4"
              ShowTooltip="true" Height="200" WithLegend="false"></DwsChartLine>
LineChart.razor.cs
private static readonly double[] _monthlyValues = [12, 18, 15, 24, 30, 28, 35, 40, 38, 45, 50, 55, 48, 52, 60, 58, 65, 70, 68, 74, 80, 77, 83, 90];

// 24 months, 2024-01 to 2025-12
private readonly DwsChartLineData _longSeriesLineChartData = new()
{
    DataElements = [.. _monthlyValues.Select((value, i) => new DwsChartLineDataElement($"{2024 + i / 12}-{i % 12 + 1:00}", value, "#5B8FF9"))]
};

Line Chart (Minimal)

Grid, tooltip and value labels all disabled — just the series line and points.

Q1Q2Q3Q4

4 values, from 25 to 50

Chart
LabelValue
Q125
Q242
Q333
Q450
Show Code
LineChart.razor
<DwsChartLine Name="ChartDemo_Chart08i" ChartData="@_minimalLineChartData" ShowGrid="false" ShowTooltip="false" ShowValueLabels="false"
              Height="200" WithLegend="false"></DwsChartLine>
LineChart.razor.cs
private readonly DwsChartLineData _minimalLineChartData = new()
{
    DataElements =
    [
        new DwsChartLineDataElement("Q1", 25, "#61DDAA"),
        new DwsChartLineDataElement("Q2", 42, "#61DDAA"),
        new DwsChartLineDataElement("Q3", 33, "#61DDAA"),
        new DwsChartLineDataElement("Q4", 50, "#61DDAA")
    ]
};

Line Chart (Two-Point Before/After)

The minimum supported data length — two points — for a simple before/after comparison.

BeforeAfter

2 values, from 20 to 65

Chart
LabelValue
Before20
After65
Show Code
LineChart.razor
<DwsChartLine Name="ChartDemo_Chart08j" ChartData="@_twoPointLineChartData" ShowGrid="true" ShowTooltip="true" ShowValueLabels="true"
              Height="200" WithLegend="false"></DwsChartLine>
LineChart.razor.cs
private readonly DwsChartLineData _twoPointLineChartData = new()
{
    DataElements =
    [
        new DwsChartLineDataElement("Before", 20, "#F6BD16"),
        new DwsChartLineDataElement("After", 65, "#F6BD16")
    ]
};

Loading and Empty Content

IsLoading shows the loading state while the data is on its way; EmptyContent replaces the "No data available" message with the application's own content (a hint, a link) when there is nothing to draw.

Loading chart...

2 series, 12 categories, values from 42 to 80

Chart
LabelRevenue 2025Revenue 2026
Jan4250
Feb4554
Mar5149
Apr4860
May5666
Jun6171
Jul5869
Aug5574
Sep6379
Oct68–
Nov72–
Dec80–
No requests yet. They show up here a minute after the first one.

No values

Chart
LabelValue
Show Code
LineChart.razor
<DwsChartLine Name="LineChartDemo_LoadingChart" SeriesData="@_revenue" IsLoading="@_loading" Height="220" WithLegend="false" />

<DwsChartLine Name="LineChartDemo_EmptyChart" ChartData="@_empty" Height="220" WithLegend="false">
    <EmptyContent>
        <span>No requests yet. They show up here a minute after the first one.</span>
    </EmptyContent>
</DwsChartLine>
LineChart.razor.cs
private bool _loading = true; // set to false when the data arrived

Fill a Wide Card (Fill, LegendPosition)

Six months in a wide, short dashboard card. With Fill the drawing takes the card's width and Height instead of a square in its middle; the points stay round and the lines keep their width, and the month labels thin out by the measured width. LegendPosition Auto puts the two series in one row below the plot. A phone-sized chart keeps its usual layout.

Findings per month
Blocked, June 2026Blocked, July 2026Blocked, August 2026Blocked, September 2026Blocked, October 2026Blocked, November 2026Flagged, June 2026Flagged, July 2026Flagged, August 2026Flagged, September 2026Flagged, October 2026Flagged, November 2026
Blocked
Flagged

2 series, 6 categories, values from 38 to 171

Findings per month
LabelBlockedFlagged
Jun 202642118
Jul57131
Aug3896
Sep71152
Oct64140
Nov89171
Show Code
LineChart.razor
<DwsChartLine Name="LineChartDemo_FillChart" Title="Findings per month" SeriesData="@_findings"
              Fill="true" LegendPosition="DwsChartLegendPosition.Auto" Height="260"></DwsChartLine>
LineChart.razor.cs
private static readonly List<DateTime> months = [.. Enumerable.Range(0, 6).Select(m => new DateTime(2026, 6, 1).AddMonths(m))];

private readonly DwsChartSeriesData _findings = new DwsChartSeriesData { CategoryDates = months }
    .AddSeries("Blocked", [42, 57, 38, 71, 64, 89])
    .AddSeries("Flagged", [118, 131, 96, 152, 140, 171]);

Interface-Description

Name Typ Parameters Description
ZoomToAsync Task int firstIndex, int lastIndex DwsChartLine / DwsChartArea. Shows the categories from firstIndex to lastIndex (positions in the category list or the flat list). Ends beyond the series are cut back to it. Works without AllowZoom too.
ResetZoomAsync Task DwsChartLine / DwsChartArea. Shows everything again.
IsZoomed bool DwsChartLine / DwsChartArea (a property). Whether the chart shows only a part of its series.
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.
ShowGrid bool false (pie) / true (bar/line/area/radar) DwsChartPie/DwsChartBar/DwsChartLine/DwsChartArea/DwsChartRadar only. Renders a grid: lines behind bar/line/area charts, rings behind a radar and over a pie's slices.
GridLineCount int 3 (pie) / 4 (bar/line/area/radar) DwsChartPie/DwsChartBar/DwsChartLine/DwsChartArea/DwsChartRadar only. Number of grid rings/lines rendered when ShowGrid is true.
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.
ShowCrosshair bool true DwsChartLine only. The pointer does not have to be on a point: anywhere in the plot the point nearest to it horizontally becomes the hovered one (its tooltip shows), and a dashed crosshair marks its position and value. Clicks, OnPointPointerEnter and OnPointPointerLeave stay with the points themselves. False restores hovering the points only.
SeriesColor string? null DwsChartLine/DwsChartArea/DwsChartRadar only. Fill/stroke color of the series line/area/polygon; falls back to the theme primary color when not set.
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.
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).
ShowAxes bool? null DwsChartLine/DwsChartArea/DwsChartBar. Shows the value axis (round tick labels) and the category axis (labels that turn or thin out when crowded); the grid lines then sit on the ticks. Null: on with SeriesData, off for a flat ChartData list. Switching it on for a flat list does not move its drawing.
ValueAxisTitle / CategoryAxisTitle string? null DwsChartLine/DwsChartArea/DwsChartBar. Titles beside the axes, shown while the axes are shown.
AxisTickCount int 5 DwsChartLine/DwsChartArea/DwsChartBar. About how many values the value axis labels (2 to 20); it picks round steps near it.
AxisMin / AxisMax double? null DwsChartLine/DwsChartArea/DwsChartBar with SeriesData. Fixed ends of the value axis. Null: zero and the data's extremes, widened to a round tick.
CategoryLabelStep int? null DwsChartLine/DwsChartArea/DwsChartBar. Labels every n-th category. Null labels all while they fit and thins them out beyond 24.
Fill bool false DwsChartLine/DwsChartArea/DwsChartBar (vertical). The drawing takes the chart's measured width and Height instead of a square in the middle of a wide card. Bars stretch (at most 56 px wide each, so a single category is no slab); lines and areas get a viewBox of the plot's own ratio, so points stay round and strokes keep their width. Tooltips and HTML labels stay on the marks; category labels thin out by the measured width. A phone-sized chart keeps its usual layout; dense bars that scroll sideways do not fill. Horizontal bars always fill.
LegendPosition DwsChartLegendPosition DwsChartLegendPosition.Right DwsChartLine/DwsChartArea/DwsChartBar. Right / Left: the bordered table beside the drawing. Bottom / Top: a compact row of entries below / above it, without a border. Auto: the row below for up to 8 entries, the table beside for more. A phone-sized chart always puts the legend below as a grid.
Smoothing DwsChartSmoothing DwsChartSmoothing.None DwsChartLine/DwsChartArea. How the points of a series are joined: None (straight lines, the markup as before: polyline / polygon), Monotone (a curve through every point that never rises above or falls below the two values it joins, so a peak is exactly as high as its value and a flat stretch stays flat; drawn as a path) or Step (each value held around its category, changing halfway to the next). A missing value breaks a curve as it breaks a straight line; the points, the tooltip, the crosshair and the keyboard stay on the real values. A series can set its own with DwsChartSeries.Smoothing (null = the chart's). In a stacked area chart the bottom edge of a band follows the top edge of the band under it.
AllowZoom bool false DwsChartLine / DwsChartArea. Lets the user zoom into a long series along the category axis and move along it: Ctrl / Cmd + mouse wheel zooms around the pointer (the plain wheel too while the plot has the keyboard focus), two fingers pinch and move, dragging moves a zoomed plot; + and - zoom, 0 shows everything, and with the focus on the plot itself Left / Right move it. The plot becomes a Tab stop. Categories outside the part shown have no point, label or tooltip; their lines and areas run on to the edge and are cut off there. Zooming in far enough brings back value labels a long series does not print. Needs interactivity.
MaxZoom double 20 DwsChartLine / DwsChartArea with AllowZoom. How far the user can zoom in: the smallest part of the category axis shown is one in this many, and never less than two steps of it.
ShowZoomReset bool true DwsChartLine / DwsChartArea with AllowZoom. Shows a button in the corner of the plot that shows everything again, while the chart is zoomed.
FixedValueAxisOnZoom bool false DwsChartLine / DwsChartArea. False fits the value axis to the values that are shown (and the one before and after them); true keeps the value axis of the whole series, so heights can be compared between two parts of it. AxisMin / AxisMax still fix an end.
AxisValueFormatter Func<double, string>? null DwsChartBar/DwsChartLine/DwsChartArea. Writes the tick labels of the value axis in the application's own format ("1.234,5 €", fixed decimals) instead of compact numbers ("1.2K"). Receives the tick's value; the "%" of a 100 % stacked chart is then not appended. Pass a method or a delegate kept in a field - a lambda written in the markup is new with every render and makes the chart work its drawing out again.
ValueFormat DwsChartValueFormatPreset Compact DwsChartBar/DwsChartLine/DwsChartArea. How values are written on the axis, the value labels (short form) and in the tooltip (full form), in the chart's culture: Compact ("1.2K" / "1,2 Tsd."), Number ("1,234.5"), Bytes (binary steps: "1.5 MB"), Duration (the value in seconds: "450 ms", "3 min 20 s") or Percent (45 = "45%" / "45 %"). AxisValueFormatter still wins for the ticks. The formatter is public for every chart: DwsChartValueFormat.Format(value, preset, culture, full).
Caption string? null DwsChartBar/DwsChartLine/DwsChartArea. A sentence under the chart (p.dws-chart-caption: what it shows, the source, the period); the drawing's aria-describedby names it, so screen readers read it with the chart.
IsLoading bool false DwsChartBar/DwsChartLine/DwsChartArea. The data is still loading: the chart shows its loading state (spinner and "Loading chart...") instead of the drawing or the empty content.
EmptyContent RenderFragment? null DwsChartBar/DwsChartLine/DwsChartArea. Shown instead of the drawing when there is nothing to draw (no data, or fewer than two points of a line or area). Null shows the chart's icon and "No data available".
SeriesData.CategoryDates List<DateTime>? null DwsChartBar/DwsChartLine/DwsChartArea (a property of DwsChartSeriesData). A date axis: one date per category. While Categories is empty the labels are written from the dates in the chart's culture, in the unit they are apart - "14:00" for hours (with the day where it changes), "Mar 9" / "9. März" for days and weeks, "Mar" for months (with the year at the first and at January), "2027" for years - and thinned to the measured width; the tooltip and the accessible names carry the full date.
(touch) DwsChartBar/DwsChartLine/DwsChartArea. A tap anywhere in the plot shows the nearest category's tooltip (every series there) and keeps it; a tap outside the chart, Escape or a second tap on the category closes it. Points and bars take a finger about 24 px wide. On a phone the legend goes under the drawing, value labels that would collide are left out (the highest and lowest of each series stay) and category labels are thinned to the measured width instead of turned. Dense vertical bars that would get thinner than 4 px make the plot scroll sideways inside the chart while the value axis stays. AllowZoom on a touch screen: a range brush with two handles under the plot sets the part shown; a finger on the drawing scrolls the page.
Name Typ Description
OnItemSelected EventCallback<string> Triggered when a chart segment/bar/point is selected. Returns the selected item key/label.
OnPointClick EventCallback<DwsChartLineItemEventArgs> / EventCallback<DwsChartAreaItemEventArgs> / EventCallback<DwsChartRadarItemEventArgs> DwsChartLine/DwsChartArea/DwsChartRadar only. Triggered when a point is clicked.
OnPointPointerEnter EventCallback<DwsChartLineItemEventArgs> / EventCallback<DwsChartAreaItemEventArgs> / EventCallback<DwsChartRadarItemEventArgs> DwsChartLine/DwsChartArea/DwsChartRadar only. Triggered when the pointer enters a point.
OnPointPointerLeave EventCallback<DwsChartLineItemEventArgs> / EventCallback<DwsChartAreaItemEventArgs> / EventCallback<DwsChartRadarItemEventArgs> DwsChartLine/DwsChartArea/DwsChartRadar only. Triggered when the pointer leaves a point.
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).
OnViewChanged EventCallback<DwsChartLineViewChangedEventArgs> / EventCallback<DwsChartAreaViewChangedEventArgs> DwsChartLine / DwsChartArea. Raised when the part of the category axis that is shown changed, by a gesture, the reset button or a method: FirstIndex / LastIndex and FirstCategory / LastCategory of the categories shown, Start / End (the part as shares of the whole axis, 0 to 1), ValueMin / ValueMax of the value axis as drawn, IsZoomed.
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.
An error has occurred. This app may no longer respond until reloaded.