RizzyUI

Chart

The RzChart component provides a fluent C# API for rendering Chart.js visualizations in SSR workflows.

Looking for bar-specific patterns? See the Chart Bar Examples page.

Basic Usage

Basic chart usage
<RzChart Configure=@(c => c
    .Data(d => d
        .Labels("January", "February", "March", "April", "May", "June", "July")
        .Datasets(ds => ds
            .Line()
            .Label("Monthly Sales")
            .Data(65, 59, 80, 81, 56, 55, 40)
            .BackgroundColor("var(--chart-1)")
            .BorderColor("var(--chart-1)")
            .Tension(0.4)
        )
    )
    .Options(o => o
        .Responsive(true)
        .MaintainAspectRatio(false)
        .Plugins(p => p.Legend(l => l.Position(LegendPosition.Top)))
    )) />