Blazor-ApexCharts 3.0.0

.NET Core

Blazor-ApexCharts

A blazor wrapper for ApexCharts.js

Demo

v2.0 Released to production!

It's no longer necessary to manually include javascript files. Please REMOVE any references to:

<script src="_content/Blazor-ApexCharts/js/apex-charts.min.js"></script>
<script src="_content/Blazor-ApexCharts/js/blazor-apex-charts.js"></script>

As of version 2.0 javascript interop on WASM is running synchronously for better performance.

Installation

NuGet

Blazor-ApexCharts

dotnet add package Blazor-ApexCharts

Usage

Imports

Add a reference to Blazor-ApexCharts in your _Imports.razor

@using ApexCharts

.NET 8

If you are on .NET 8 you need to set the rendermode to Interactive.

Interactive Server, Interactive WebAssembly or Interactive Auto

Your first chart

    <ApexChart TItem="MyData"
               Title="Sample Data">

        <ApexPointSeries TItem="MyData"
                         Items="Data"
                         Name="Net Profit"
                         SeriesType="SeriesType.Bar"
                         XValue="e => e.Category"
                         YValue="e=> e.NetProfit" />

        <ApexPointSeries TItem="MyData"
                         Items="Data"
                         Name="Revenue"
                         SeriesType="SeriesType.Bar"
                         XValue="e => e.Category"
                         YValue="e=> e.Revenue" />
    </ApexChart>
    
@code {
    private List<MyData> Data { get; set; } = new();
    protected override void OnInitialized()
    {
        Data.Add(new MyData { Category = "Jan", NetProfit = 12, Revenue = 33 });
        Data.Add(new MyData { Category = "Feb", NetProfit = 43, Revenue = 42 });
        Data.Add(new MyData { Category = "Mar", NetProfit = 112, Revenue = 23 });
    }

    public class MyData
    {
        public string Category { get; set; }
        public int NetProfit { get; set; }
        public int Revenue { get; set; }
    }
}

Chart Options

Apex Chart options are available in the ApexChartOptions class that can be passed to the chart. More info in Apex documentation ApexCharts Docs.

Acknowledgments

Credits to @thirstyape for making production release possible.

Stargazers repo roster for @apexcharts/Blazor-ApexCharts

No packages depend on Blazor-ApexCharts.

Version Downloads Last updated
6.0.1 0 5/21/2025
6.0.0 0 4/28/2025
5.1.0 1 3/6/2025
5.0.1 1 3/6/2025
5.0.0 1 3/6/2025
4.0.1 1 3/6/2025
4.0.0 1 3/6/2025
3.5.0 1 3/6/2025
3.4.0 1 3/6/2025
3.3.0 1 3/6/2025
3.2.0 1 3/6/2025
3.1.0 1 3/6/2025
3.0.0 1 3/6/2025
2.3.3 1 3/6/2025
2.3.2 1 3/6/2025
2.3.1 1 3/6/2025
2.3.0 1 3/6/2025
2.2.1 1 3/6/2025
2.2.0 1 2/28/2025
2.1.0 1 3/6/2025
2.0.0 1 3/6/2025
1.3.0 1 3/6/2025
1.2.1 1 3/6/2025
1.1.1 1 3/7/2025
1.1.0 1 3/6/2025
1.0.1 1 3/6/2025
1.0.0 1 3/6/2025
0.9.22-beta 1 2/28/2025
0.9.21-beta 2 9/4/2023
0.9.20-beta 1 2/28/2025
0.9.19-beta 1 2/28/2025
0.9.18-beta 1 2/28/2025
0.9.17-beta 1 2/28/2025
0.9.16-beta 1 2/28/2025
0.9.15-beta 1 2/28/2025
0.9.14-beta 1 2/28/2025
0.9.13-beta 1 2/28/2025
0.9.12-beta 2 2/28/2025
0.9.11-beta 1 2/28/2025
0.9.10-beta 1 2/28/2025
0.9.8-beta 1 3/4/2025
0.9.7-beta 1 3/4/2025
0.9.6-beta 1 3/4/2025
0.9.5-beta 1 3/4/2025
0.9.4-beta 1 3/4/2025
0.9.3-beta 1 3/4/2025
0.9.2-beta 1 3/4/2025
0.9.1-beta 1 3/4/2025
0.9.0-beta 1 3/4/2025
0.8.2-beta 1 3/4/2025
0.8.1-beta 1 3/4/2025
0.8.0-beta 1 3/4/2025
0.7.0-beta 1 3/4/2025
0.6.1-alpha 1 2/28/2025
0.6.0-alpha 1 3/2/2025
0.5.0-alpha 1 3/2/2025
0.4.1-alpha 1 2/28/2025
0.4.0-alpha 1 3/2/2025
0.2.4-alpha 1 2/28/2025
0.2.3-alpha 1 2/28/2025
0.2.2-alpha 1 3/2/2025
0.2.1-alpha 1 2/28/2025
0.2.0-alpha 1 3/2/2025
0.1.1-alpha 1 3/2/2025
0.1.0-alpha 1 3/2/2025
0.0.4-apha 1 3/5/2025
0.0.3-alpha 1 3/2/2025