Skip to content
daisyBlazor

RidgelineChart

One density curve per group, stacked in rows on a shared axis, so the shapes are easy to compare: sign-ins by hour for each weekday, response times by region. The layout estimates the densities and D3 draws the curves.
Distribution
Cover · <RidgelineChart>
Ridgeline plotDensity of values for Mon, Tue, Wed, Thu, Sat, one row each.5101520MonTueWedThuSatMon: 520 values Tue: 490 values Wed: 460 values Thu: 430 values Sat: 160 values

Examples

Basic

Groups are drawn top to bottom in order. By default the tallest peak rises 1.6 rows, so curves overlap the row above.

Sign-in time of day, by weekday
Sign-in time of day, by weekdayDensity of values for Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday, one row each.24681012141618202224MondayTuesdayWednesdayThursdayFridaySaturdaySundayHour of day (UTC)Monday: 520 values Tuesday: 500 values Wednesday: 480 values Thursday: 460 values Friday: 440 values Saturday: 160 values Sunday: 140 values
website/Examples/Charts/RidgelineChartBasicExample.razor Source

Overlap="1" keeps each curve within its own row; Bandwidth (in value units) applies the same smoothing to every group.

Ridgeline plot of Response time (ms)Density of values for EU West, US East, APAC, LATAM, one row each.050100150200250300350400EU WestUS EastAPACLATAMResponse time (ms)EU West: 300 values US East: 300 values APAC: 300 values LATAM: 200 values
website/Examples/Charts/RidgelineChartOverlapExample.razor Source

Playground

Sign-in time of day, by weekday
Sign-in time of day, by weekdayDensity of values for Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday, one row each.24681012141618202224MondayTuesdayWednesdayThursdayFridaySaturdaySundayHour of day (UTC)Monday: 520 values Tuesday: 500 values Wednesday: 480 values Thursday: 460 values Friday: 440 values Saturday: 160 values Sunday: 140 values
<RidgelineChart
                ValueTitle="Hour of day (UTC)"
                Title="Sign-in time of day, by weekday"
                Groups="@_days" />

@code {
    // Weekdays peak in the morning and after lunch; weekends are later and flatter.
    private readonly ValueGroup[] _days =
    [
        .. new[] { "Monday", "Tuesday", "Wednesday", "Thursday", "Friday" }.Select((day, i) => new ValueGroup(day,
            [.. DistributionSamples.Normal(seed: 80 + i, count: 300, mean: 9.5, sd: 1.4, min: 0), .. DistributionSamples.Normal(seed: 90 + i, count: 220 - 20 * i, mean: 14.5, sd: 1.8)])),
        new("Saturday", DistributionSamples.Normal(seed: 86, count: 160, mean: 13, sd: 3.5, min: 0)),
        new("Sunday", DistributionSamples.Normal(seed: 87, count: 140, mean: 15, sd: 3.8, min: 0)),
    ];
}

API

<RidgelineChart>

DaisyBlazor.Charts

Parameters

  • AspectRatio double
    = 1.78

    Width divided by height. The chart keeps this shape at any width; its text keeps its size.

  • Bandwidth double
    = 0

    Kernel bandwidth in value units: smaller shows more bumps, larger smooths them out. 0 picks one per group (Silverman's rule).

  • Groups IReadOnlyList<ValueGroup>
    = []

    The groups, one row each from top to bottom, with their raw values. Values that are not finite numbers are ignored; empty groups are not drawn.

  • Overlap double
    = 1.6

    How many rows the tallest peak rises above its baseline. Above 1, curves overlap the rows above them.

  • 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.

  • 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.

  • 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.Charts

A 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
Something went wrong while running the docs. Reload