Examples
Each ValueGroup holds a name and its raw values. Hover a box for its median, quartiles, whiskers and count.
Horizontal puts the groups down the side, which suits long names. A group's Color overrides the palette.
Playground
<BoxPlotChart
ValueTitle="Response time (ms)"
ValueFormat="{0:N0} ms"
Title="API response time by region"
Groups="@_regions" />
@code {
// Raw response times; the chart works out the quartiles, whiskers and outliers.
private readonly ValueGroup[] _regions =
[
new("EU West", DistributionSamples.Skewed(seed: 41, count: 200, median: 85)),
new("US East", DistributionSamples.Skewed(seed: 42, count: 200, median: 70)),
new("US West", DistributionSamples.Skewed(seed: 43, count: 200, median: 95, spread: 0.3)),
new("APAC", DistributionSamples.Skewed(seed: 44, count: 200, median: 140, spread: 0.45)),
new("LATAM", DistributionSamples.Skewed(seed: 45, count: 120, median: 160, spread: 0.5)),
];
}API
<BoxPlotChart>
DaisyBlazor.ChartsParameters
- AspectRatio double= 1.78
Width divided by height. The chart keeps this shape at any width; its text keeps its size.
- Groups IReadOnlyList<
ValueGroup> = []The groups, each with its raw values. Values that are not finite numbers are ignored; empty groups are not drawn.
- Horizontal bool= false
Lay the boxes out in rows, with values along the horizontal axis.
- RowHeight double?= null
Height of each row in px, for a chart that lays its categories out as rows (horizontal bars, a Gantt's lanes, a heatmap's rows…): its height then follows its number of rows instead of AspectRatio, so a long list keeps readable rows at any width. A chart, or an orientation, without rows ignores it.
- ShowOutliers bool= true
Draw values beyond the whiskers as individual dots.
- ShowTitle bool= true
Draw Title as a visible heading above the chart (the default); false keeps it only as the chart's accessible name, for a chart inside a card that already has a heading.
- Title string= null
Optional heading rendered above the chart; it is also the chart's accessible name.
- ValueFormat string= "{0:#,0.##}"
Format string for values in tooltips and the description, e.g. "{0:N0} ms".
- ValueTitle string= null
Title of the value axis, e.g. "Response time (ms)".
- Width string= "100%"
CSS width of the chart wrapper.
- Class string= null
Additional CSS classes merged onto the w-full wrapper.
- Style string= null
Inline styles appended after the width on the wrapper.
ValueGroup
DaisyBlazor.ChartsA named set of raw values, summarised by BoxPlotChart, ViolinChart, BeeswarmChart and RidgelineChart. Values that are not finite numbers are ignored; a group with none left is not drawn.
Properties
- Color string
Optional CSS colour; falls back to the theme palette by position.
- Name string
Group label, shown on the axis and in tooltips.
- Values IReadOnlyList<
double> The raw observations.
Methods
- <Clone>$ () → ValueGroup
- Deconstruct (String& Name,
IReadOnlyList`1& Values, String& Color) → void - Equals (object obj) → bool
- Equals (ValueGroup other) → bool
- GetHashCode () → int
- ToString () → string