BlazorExpress.ChartJS
2.0.0
Prefix Reserved
dotnet add package BlazorExpress.ChartJS --version 2.0.0
NuGet\Install-Package BlazorExpress.ChartJS -Version 2.0.0
<PackageReference Include="BlazorExpress.ChartJS" Version="2.0.0" />
<PackageVersion Include="BlazorExpress.ChartJS" Version="2.0.0" />
<PackageReference Include="BlazorExpress.ChartJS" />
paket add BlazorExpress.ChartJS --version 2.0.0
#r "nuget: BlazorExpress.ChartJS, 2.0.0"
#:package BlazorExpress.ChartJS@2.0.0
#addin nuget:?package=BlazorExpress.ChartJS&version=2.0.0
#tool nuget:?package=BlazorExpress.ChartJS&version=2.0.0
BlazorExpress.ChartJS component library
An open-source, production-ready Blazor charts component library built on the Blazor and Chart.js JavaScript library.
Table of contents
Quick start
Get started any way you want
- Clone the repo:
git clone https://github.com/BlazorExpress/BlazorExpress.ChartJS - Install with the .NET CLI:
dotnet add package BlazorExpress.ChartJS --version 2.0.0 - Or with the NuGet Package Manager Console:
Install-Package BlazorExpress.ChartJS -Version 2.0.0 - Upgrading from 1.x? 2.0.0 changes some defaults and behaviour, so read the 2.0.0 release notes first.
Then draw your first chart:
Add the scripts to
wwwroot/index.html(Blazor WebAssembly) orComponents/App.razor(Blazor Web App), after Blazor's own script (_framework/blazor.webassembly.jsor_framework/blazor.web.js):<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.6.1/chart.umd.js" integrity="sha512-Vj/VnWZpOof68AJOIBxA90+7KQccA7eISngKbl18q5MQO3KnvO1a0z76Q+7hj8+iDIwETpKUBPN+cLy7PxvTEQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/chartjs-plugin-datalabels/2.2.0/chartjs-plugin-datalabels.min.js" integrity="sha512-JPcRR8yFa8mmCsfrw4TNte1ZvF1e3+1SdGMslZvmrzDYxS69J7J49vkFL8u6u8PlPJK+H3voElBtUCzaXj+6ig==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> <script src="_content/BlazorExpress.ChartJS/blazorexpress.chartjs.js"></script>Add the namespace to
_Imports.razor:@using BlazorExpress.ChartJSAdd a chart to a page. In a Blazor Web App, the page needs an interactive render mode, for example
@rendermode InteractiveServerat the top of the page; without one the page renders as static HTML and the chart is not drawn.
<BarChart @ref="barChart" role="img" aria-label="Bar chart: units sold per month" Width="600" />
@code {
private BarChart barChart = default!;
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (!firstRender)
return;
var data = new ChartData
{
Labels = new List<string> { "January", "February", "March", "April" },
Datasets = new List<IChartDataset>
{
new BarChartDataset
{
Label = "Units sold",
Data = new List<double?> { 120, 150, 180, 140 },
BackgroundColor = new List<string> { "rgb(81, 43, 212)" },
},
},
};
await barChart.InitializeAsync(data, new BarChartOptions { Responsive = true });
}
}
The getting started guide covers installation for Blazor WebAssembly and Blazor Web App (Server), and the samples show every chart type and option.
Online Demos
- Demos Website
- Samples gallery: every sample with copyable source, searchable by chart, category and tag
- Scenarios: real-world tasks such as loading data from an API, live updates, dashboards, dark theme colours and large datasets
Supported Tech Stack
| BlazorExpress.ChartJS | .NET | Chart.js | chartjs-plugin-datalabels |
|---|---|---|---|
| 2.0.0+ | 8, 9, 10, 11 | 4.6.1 | 2.2.0 |
| 1.2.2+ | 8, 9, 10 | 4.4.1 | 2.2.0 |
| 1.1.0+ | 8 | 4.4.1 | 2.2.0 |
| 1.0.0 | 8 | 4.0.1 | 2.2.0 |
Components
| Component Name | Demos | Docs |
|---|---|---|
| Charts: Bar chart | Demos | Docs |
| Charts: Bubble chart | Demos | Docs |
| Charts: Doughnut chart | Demos | Docs |
| Charts: Line chart | Demos | Docs |
| Charts: Pie chart | Demos | Docs |
| Charts: Polar area chart | Demos | Docs |
| Charts: Radar chart | Demos | Docs |
| Charts: Scatter chart | Demos | Docs |
Screenshots
Captured from the online demos; each image links to the sample it shows.
Chart types
Bar chart

Bubble chart

Doughnut chart

Line chart

Pie chart

Polar area chart

Radar chart

Scatter chart

New in 2.0.0
Time series
Line chart on a timeseries axis with dates from C#; no date adapter script needed.

Tick and tooltip functions
Axis ticks and tooltip text formatted by JavaScript functions registered by name and set from C#.

Floating bars
A project schedule drawn with floating bars, each with a start and an end value (BarChartDataset.FloatingData).

Half gauge
A half-doughnut gauge from Rotation and Circumference.

Gradient fill
A line area filled with a gradient set by a JavaScript function.

Multiple axes
A second y axis on the right (Scales.AdditionalAxes).

More components coming...
Creators
Vikram Reddy
Copyright and license
Code and documentation copyright 2026 Blazor Express Code released under the Apache-2.0 License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. net11.0 is compatible. |
-
net10.0
- BlazorExpress.Core (>= 0.3.0)
- Microsoft.AspNetCore.Components.Web (>= 10.0.0)
-
net11.0
- BlazorExpress.Core (>= 0.3.0)
- Microsoft.AspNetCore.Components.Web (>= 11.0.0)
-
net8.0
- BlazorExpress.Core (>= 0.3.0)
- Microsoft.AspNetCore.Components.Web (>= 8.0.17)
-
net9.0
- BlazorExpress.Core (>= 0.3.0)
- Microsoft.AspNetCore.Components.Web (>= 9.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on BlazorExpress.ChartJS:
| Repository | Stars |
|---|---|
|
vikramlearning/blazorbootstrap
An Enterprise-class Blazor Bootstrap Component library built on the Blazor and Bootstrap CSS frameworks.
|