Examples
Each hexagon's tooltip gives its count, formatted with CountFormat; the legend shows the lightest and darkest counts.
Radius sets the hexagon size in chart units: bigger hexagons give a coarser, smoother picture. Color takes any CSS colour.
Playground
<HexbinChart
XTitle="Payload (KB)"
YTitle="Response time (ms)"
CountFormat="{0:N0} requests"
Title="API requests by payload and response time"
Points="@_requests" />
@code {
// 3,000 requests would be a solid blot as dots; hexagons show where they concentrate.
private readonly ScatterPoint[] _requests =
[
.. DistributionSamples.Cloud(seed: 31, count: 2_400, xMean: 40, xSd: 14, intercept: 50, slope: 2, noise: 18),
.. DistributionSamples.Cloud(seed: 32, count: 600, xMean: 110, xSd: 20, intercept: 120, slope: 1.5, noise: 40),
];
}API
<HexbinChart>
DaisyBlazor.ChartsParameters
- AspectRatio double= 1.78
Width divided by height. The chart keeps this shape at any width; its text keeps its size.
- Color string= "var(--color-primary)"
Colour of the hexagons (any CSS colour); the fuller a hexagon, the more opaque.
- CountFormat string= "{0:N0} points"
Format string for a hexagon's count in its tooltip and the legend, e.g. "{0:N0} sessions".
- Points IReadOnlyList<
ScatterPoint> = []The points to bin. Size, Series and Label are ignored; points without a finite X and Y are skipped.
- Radius double= 12
Hexagon radius (centre to corner) in chart units. Smaller shows more detail, larger smooths more.
- 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.
- ShowLegend bool= true
Show a key under the chart giving the counts of the lightest and darkest hexagons.
- 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.
- Width string= "100%"
CSS width of the chart wrapper.
- XTitle string= null
Title of the horizontal axis.
- YTitle string= null
Title of the vertical axis.
- Class string= null
Additional CSS classes merged onto the w-full wrapper.
- Style string= null
Inline styles appended after the width on the wrapper.
ScatterPoint
DaisyBlazor.ChartsOne observation of a ScatterChart, ContourChart or HexbinChart. Points whose X or Y is not a finite number are skipped.
Properties
- Label string
Optional name shown first in the point's tooltip (ScatterChart only).
- Series string
Optional series name (ScatterChart only); each series gets its own colour and legend entry.
- Size double?
Optional bubble size (ScatterChart only); the bubble's area is proportional to it.
- Value double?
Optional measured value at (X, Y), interpolated over the plot by a ContourChart in Value mode.
- X double
Horizontal value.
- XError double?
Optional symmetric error on X (ScatterChart only): a horizontal error bar from X − XError to X + XError. Ignored unless above zero.
- Y double
Vertical value.
- YError double?
Optional symmetric error on Y (ScatterChart only): a vertical error bar from Y − YError to Y + YError. Ignored unless above zero.
Methods
- <Clone>$ () → ScatterPoint
- Deconstruct (Double& X,
Double& Y, Nullable`1& Size, String& Series, String& Label) → void - Equals (object obj) → bool
- Equals (ScatterPoint other) → bool
- GetHashCode () → int
- ToString () → string