Radar chart
Since 0.1.0-alpha.22IzzyBlazor.RadarChart<TItem> in the IzzyBlazor.Core package, generated from the 0.1.0-alpha.31 assembly
and its doc comments.
Properties (22)
RefreshTimeSpan?How often the chart reads its data again, at least a second, such as Refresh="TimeSpan.FromSeconds(30)". On a static page the page (or RefreshFrom) is fetched again and the chart drawn from it, found by its id, which it then needs; on an interactive page OnRefresh is raised, for you to load new data. Not while the tab is hidden or the chart is off-screen, nor (static) while the pointer or focus is in it. Unlike Chart's, it has no Pause button.
RefreshFromstring?On a static page with Refresh: a lighter page to fetch than this one, which renders the same chart with the same id.
ItemsIEnumerable<TItem>? requiredThe items: each a spoke with a value per series, or with SeriesBy one value each.
ArgumentExpression<Func<TItem, object?>> requiredEach item's spoke, such as s => s.Quality. Spokes keep the order the items first name them in.
Titlestring?The chart's title, such as "Review scores", shown above it as its caption. It also names the chart for screen readers. A chart needs a Title or TitledBy.
HideTitlebool = falseHides the title, which still names the chart for screen readers.
Downloadbool = falseShows a button across from the title that saves the chart as a PNG, named after its title, in the color scheme on screen. With JavaScript off there's no button.
TitleAlignChartAlign = ChartAlign.StartWhere the title sits: at the start by default (the left, in a left-to-right page); ChartAlign.Center or ChartAlign.End.
TitledBystring?The id of a heading already on the page that titles the chart, such as a card's, in place of Title: the chart takes its name from it and shows no title of its own.
ValueFormatstring?A .NET format string for the values, such as N0 or P0: on the rings, in the tooltips and the table.
ArgumentFormatstring?A .NET format string for the spokes' names, when they're numbers or dates.
Mindouble?The value at the center: 0 by default, or the round tick at or below the lowest value when that's below 0. Set it to the scale's real bottom, such as 1 for ratings from 1 to 5.
Maxdouble?The value at the outer ring: the round number at or above the largest value by default. Set it to the scale's real top, such as 100 for scores out of 100, so the outline's size means something.
GridRadarGrid = RadarGrid.PolygonThe rings' shape: RadarGrid.Polygon (the default), straight between spokes as the outlines are, or RadarGrid.Circle.
StartAngledouble = 0Where the first spoke points, in degrees clockwise from the top: 90 points it right. 0 by default.
SizeLength? (computed)The circle's largest size. Defaults to 20rem; it's smaller when its container is narrower, with room kept for the names around it.
PaletteChartPalette?LegendChartLegend = ChartLegend.AutoWhere the legend goes: above the plot with two or more series by default (ChartLegend.Auto), ChartLegend.Top, ChartLegend.Bottom, beside it with ChartLegend.Start or ChartLegend.End, or ChartLegend.None. With script, each item hides and shows its series.
LegendAlignChartAlign = ChartAlign.StartThe legend's place along its edge: the start by default, the center or the end.
Tooltipbool?The tooltip for the spoke under the pointer or the keyboard, with every series' value there (with script). By default it's on unless every series writes its values (Labels); true always; false never, with no keys either.
DataTableChartDataTable = ChartDataTable.PopoverThe values as a table, spokes by series: by default behind a "Show data" button that opens it over the chart; ChartDataTable.Collapsed puts it in a disclosure under the chart.
ChildContentRenderFragment?RadarSeries<T>s, and a ChartTooltip<T> for your own tooltip.
Plus 17 item props and 4 common props.
Show them hereEvents (1)
Parts (1)
Components written inside RadarChart, documented here with it.
RadarSeries<TItem>
One outline on a RadarChart<T>: a value at each spoke, joined around the circle, with a marker at each. Renders nothing itself; the chart draws it.
ValueExpression<Func<TItem, object?>> requiredThe value at each spoke, such as s => s.Score: any number, or null for none (a gap in the outline).
Namestring? (computed)The series' name, in the legend, the tooltip and the data table. Defaults to the property's [Display] name, or its name in words.
SeriesByExpression<Func<TItem, object?>>?Splits the series into one per value of this, such as s => s.Player, for items that each hold one value: rows of (player, skill, score) become an outline per player. Each is named by its value and takes the next color and marker, in the order the values first appear. Color doesn't apply to a split series.
Colorstring? (computed)A CSS color, such as var(--ib-color-danger). Defaults to the next of the chart palette's eight colors.
Fillbool = falseFills the outline lightly in its color. Off by default: area grows with the square of the values, so a fill makes differences look larger than they are, and fills cover each other. An outline with a gap isn't filled.
LabelsChartLabels = ChartLabels.NoneWrites each value beside its marker, pushed out along its spoke: ChartLabels.Auto (or Outside); ChartLabels.None by default. Labels aren't thinned where they overlap, so use them with one or two series. Screen readers skip them: the data table has every value.
LabelFormatstring? (computed)A .NET format string for this series' labels, such as N0. Defaults to the chart's ValueFormat.
Types (7)
ChartAlign
enumWhere a chart's title or legend sits along its edge: for a title or a legend above or below, left, center or right (in a left-to-right page); for a legend beside the chart, top, middle or bottom.
| Value | Description |
|---|---|
Start | At the start: the left (in a left-to-right page), or the top beside the chart. |
Center | Centered. |
End | At the end: the right (in a left-to-right page), or the bottom beside the chart. |
ChartDataTable
enumHow a chart offers its values as a table.
| Value | Description |
|---|---|
Popover | A "Show data" button under the chart that opens the table in a popover over it, so nothing on the page moves (the default). It works with JavaScript off. |
Collapsed | A "Show data" disclosure under the chart, closed until opened, that pushes what's below down: for a report read top to bottom, with the chart and table seen together. |
Visible | The table shows under the chart. |
None | No table, for a page that lists the values elsewhere. |
ChartLabels
enumWhere a series writes each value beside its bar or point.
| Value | Description |
|---|---|
None | No labels. |
Auto | Placed by type: past a bar's end, in the middle of a stacked segment, above a point. A label with no room there moves inside the bar or below the point, or is left out. |
Inside | Inside the bar, at its end (in the middle of a stacked segment), or below a point. |
Outside | Past the bar's end, or above a point, moving inside or below when there's no room. |
ChartLegend
enumWhether a chart has a legend, and where it goes.
| Value | Description |
|---|---|
Auto | A Chart's legend above it, under the title, when there are two series or more (a single series is named by the chart's title); a PieChart's beside the circle when there's room, and below it otherwise. |
Top | Above the chart, even for one series. |
Bottom | Below the chart, even for one series. |
Start | Beside the chart on the start side (the left, in a left-to-right page), in a column; below 30rem wide, above it instead. |
End | Beside the chart on the end side (the right, in a left-to-right page), in a column; below 30rem wide, below it instead. |
None | No legend. |
ChartPalette
classThe colors a Chart<T> or PieChart<T> gives its series or slices, or a Gauge its bands, in order: Colors (the default: the theme's palette, set with ChartPalette), one palette whatever the theme's (Contrast, OkabeIto, Calm), one series picked out with Emphasis, Shades of one color, Diverging between two, or your own with Of. Shades and diverging ramps are sampled for the number of series, so three get three even steps, and they turn round in dark mode, where the strongest color is the lightest.
| Member | Description |
|---|---|
Colors | Distinct colors, for series that aren't in an order, such as regions or products. The default. A chart of exactly two, three or four series gets a set picked for that count, so every pair stays apart for color-blind readers ( |
Contrast | The Contrast palette whatever the theme's: eight colors of one lightness, each 3:1 or more on the surface, with sets picked for two, three or four series. The same in every app: it doesn't follow the brand. |
OkabeIto | The Okabe-Ito palette whatever the theme's: the widely used color-blind-safe set, seven colors and then gray. |
Calm | The Calm palette whatever the theme's: muted colors, for dashboards read all day. |
Emphasis(int index, Color? color) | One series in color and every other one in gray, for a chart that makes a point about one series, such as this year against earlier years or one store against the rest. The gray is the text color mixed into the surface, so it keeps 3:1 on the surface in both schemes and the other series stay readable as context. The grays are alike, so give the series names: the legend and tooltips tell them apart. On a line chart, define the picked series last so it's drawn on top. |
Shades(Color color) | Light to dark shades of one color, for series in an order, such as age bands or plan tiers: the first series is the lightest. Past about six, shades are hard to tell apart. |
Tints(Color color) | Light tints of one color up to the color itself, for ranges drawn as large areas, such as a |
Diverging(Color low, Color high) | Two colors that meet at a neutral middle, for series on either side of one, such as answers from "Strongly disagree" to "Strongly agree": the first series is the strongest |
Of(Color[] colors) | Your own colors, one per series in order; they repeat past the last, up to eight. |
Length
structA width, height or flex basis: a size token, a keyword, or a CSS length built with a factory such as Rem.
| Member | Description |
|---|---|
Sm | 640px (matches the |
Md | 768px (matches the |
Lg | 1024px (matches the |
Xl | 1280px (matches the |
Prose | A comfortable reading width, 68 characters. |
Full | 100% of the containing block. |
Auto |
|
FitContent |
|
MinContent |
|
MaxContent |
|
Px(double value) | Pixels. |
Rem(double value) | Root ems (16px each by default). |
Percent(double value) | Percent of the containing block. |
Ch(double value) | Character widths, for text measures. |
Vw(double value) | Percent of the viewport width. |
Dvh(double value) | Percent of the dynamic viewport height (accounts for mobile browser bars). |
Of(string css) | Any CSS length, such as |
Css string | The CSS value this length renders as. |
RadarGrid
enumA radar's grid: rings that join the spokes with straight lines, or circles.
| Value | Description |
|---|---|
Polygon | Rings as polygons, a corner on each spoke, as the outlines are drawn. |
Circle | Rings as circles. |