Zum Inhalt springen
DIAGRAMME · COMPLETE

Sparkline

Eine winzige Trendlinie, die in einen Satz oder eine Tabellenzelle passt.

Eine winzige Trendlinie ohne Achsen, die in einen Satz oder eine Tabellenzelle passt.

Warum es hilft

  • Klein und schnell
  • Keine Achsen
  • Passt in Tabellen

Wo es passt

  • Statistiken
  • Tabellenzellen
  • Dashboards
Das Steuerelement Sparkline auf einer RayCraft-Seite

Beispiel

<Stack Direction="StackDirection.Column" Spacing="3">
    <Stack Align="center">
        <span style="width:6rem">Sales</span>
        <Sparkline Label="Sales trend" Values="_sales" Area />
        <strong>@_sales.Last().ToString("N0")</strong>
    </Stack>
    <Stack Align="center">
        <span style="width:6rem">Errors</span>
        <Sparkline Label="Error trend" Values="_errors" ColorIndex="4" />
        <strong>@_errors.Last()</strong>
    </Stack>
</Stack>

@code {
    private readonly double[] _sales = [120, 135, 128, 160, 190, 175, 210, 230];
    private readonly double[] _errors = [14, 11, 16, 9, 7, 8, 5, 4];
}

Ein kurzes Fragment. Fügen Sie @using RayCraft.Blazor.Components zu Ihrer Seite hinzu und nutzen Sie einen interaktiven Render-Modus.

Teil von RayCraft Complete.

Alle Steuerelemente ยท Dokumentation