Blazor-ApexCharts 8.0.0

dotnet add package Blazor-ApexCharts --version 8.0.0
                    
NuGet\Install-Package Blazor-ApexCharts -Version 8.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Blazor-ApexCharts" Version="8.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Blazor-ApexCharts" Version="8.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Blazor-ApexCharts" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Blazor-ApexCharts --version 8.0.0
                    
#r "nuget: Blazor-ApexCharts, 8.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Blazor-ApexCharts@8.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Blazor-ApexCharts&version=8.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Blazor-ApexCharts&version=8.0.0
                    
Install as a Cake Tool

.NET Core

Blazor-ApexCharts

A blazor wrapper for ApexCharts.js

Demo

Installation

NuGet

For Blazor projects running in a web browser, WinForms, or WPF. Blazor-ApexCharts

dotnet add package Blazor-ApexCharts

For Blazor projects running on .NET MAUI. Blazor-ApexCharts-MAUI

dotnet add package Blazor-ApexCharts-MAUI

ChartService

ApexChartService is an optional service that will manage global options, set locales, manage charts on the screen. Add the chart service to the DI container by using the extension AddApexCharts(). This will add a scoped IApexChartService to the container.

services.AddApexCharts();

or add it with global options

services.AddApexCharts(e =>
            {
                e.GlobalOptions = new ApexChartBaseOptions
                {
                    Debug = true,
                    Theme = new Theme { Palette = PaletteType.Palette6 }
                };
            });

These global options are the startup defaults. Each IApexChartService (one per DI scope, which on Blazor Server is one per user circuit) starts from its own deep copy of them, so a change made at runtime through ChartService.GlobalOptions, SetGlobalOptionsAsync or SetLocaleAsync only affects the current user. Every option object is copied, including your own subclasses of the option classes (or your own IApexChartBaseOptions implementation), even when they also implement IDisposable. Strings, delegates and objects of other types that you place in the options (for example items bound to a series) are not copied and stay shared.

To change the global options after startup, change ChartService.GlobalOptions and call ChartService.SetGlobalOptionsAsync(true), or pass new options to ChartService.SetGlobalOptionsAsync(options, true). Changing the object given to AddApexCharts (or the injected ApexChartsServiceOptions.GlobalOptions) after startup only reaches chart services created afterwards, never one that already exists. Earlier versions shared that object with every chart service, so code that relied on changing it at runtime to update every user now has to call SetGlobalOptionsAsync in each user's scope instead.

Registering ApexChartsServiceOptions and IApexChartService as scoped by hand, instead of calling AddApexCharts, still works but is no longer needed to keep users apart.

The same as above can be used for .NET MAUI, just make sure to use the method below to add the chart service.

services.AddApexChartsMaui();

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.

The chart options cannot be shared. Each chart instance must have its own ApexChartOptions instance

Premium Features & Licensing

ApexCharts 6.0 introduced a set of premium interaction modules: history (undo/redo), perspectives (shareable view state), link (crossfilter / linked views), ink (draggable annotations), measure (delta ruler), contextMenu (point actions) and storyboard (scroll-driven views). All chart types and every other option remain free and are never gated.

The premium modules work fully in trial mode, but a chart that uses one shows an unobtrusive APEXCHARTS watermark until a valid license key is applied. The key format is shared across the ApexCharts family (apexgantt, apextree, apexsankey) and is validated offline (no network call).

Apply a key one of three ways:

1. Application-wide via the chart service (recommended; the key is applied once before any chart renders):

services.AddApexCharts(e =>
{
    e.LicenseKey = "APEX-your-license-key";
});

For .NET MAUI use AddApexChartsMaui(...) with the same option.

2. From configuration / environment:

services.AddApexCharts(e =>
{
    e.LicenseKey = builder.Configuration["APEXCHARTS_LICENSE_KEY"];
});

3. Per-chart via the chart options (works without the service, and never causes a first-render flash):

<ApexChart TItem="MyData" Options="@(new ApexChartOptions<MyData> { Chart = new Chart { License = "APEX-your-license-key" } })">
    ...
</ApexChart>

You can also apply or change a key at runtime through the service; a late valid key followed by a chart update clears an on-screen watermark without a full re-render:

await ChartService.SetLicenseAsync("APEX-your-license-key");

Without any key, AddApexCharts() still works; premium features simply render watermarked.

Ignite UI Theming

From Blazor-ApexCharts 8.0.0 (which bundles ApexCharts.js 8.8.1), charts can follow the Ignite UI theme on the page: the series palette, text, gridlines, the tooltip, the font, light or dark. It is an add-on, it is free, and it needs no license key. Turn it on in the chart service:

services.AddApexCharts(e =>
{
    e.IgniteUI = true;
});

The service then loads _content/Blazor-ApexCharts/js/features/ignite-ui.js once, before the first chart renders. For .NET MAUI use AddApexChartsMaui(...) with the same option. Use this option rather than a script tag: the add-on registers on the ApexCharts instance the component loads, which a tag in index.html would not see.

The Ignite UI tokens (--ig-*) are the lowest-ranked layer above the built-in defaults. Anything above them wins:

Rank Source
1 An option you set in ApexChartOptions
2 The chart's own CSS variables
3 An --apx-* family token
4 A named theme (Theme.Name) or palette (Theme.Palette)
5 The Ignite UI theme (--ig-*), with the add-on loaded
6 The built-in defaults

To turn it off for one chart, set Theme = new Theme { DesignSystem = false }; the --apx-* tokens still apply. Tokens = false stops every token read (--apx-* and --ig-*). Without the add-on the --ig-* tokens are ignored, with no error.

The chart reads its theme on every render. After a change that does not render, such as swapping the Ignite UI stylesheet for its dark variant, call RefreshTokensAsync() on the chart.

The theme names its font but does not load it (--ig-font-family is usually a web font, and the Ignite UI theme sheets carry no @font-face for it), so include the font's stylesheet on the page, in index.html or App.razor, as the Ignite UI setup already asks. The font applies only once that stylesheet has loaded it; the chart waits for it and re-measures, so the labels are measured with it.

Acknowledgments

Credits to @thirstyape for making production release possible.

Stargazers repo roster for @apexcharts/Blazor-ApexCharts

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (34)

Showing the top 5 NuGet packages that depend on Blazor-ApexCharts:

Package Downloads
Hedin.UI

A custom razor (Blazor) component library built by and to be used by Hedin IT.

CodeBlock.DevKit.Web.Blazor.Server

CodeBlock Development Kit

Empezar.BlazorWebClient

Package Description

Cayaqui.MPS.Components

Design system and EVM/EPC reusable components (KPI strip, gauges CPI/SPI/PF, S-curves, Gantt, WBS tree grid, R9C, risk heatmap, change orders, purchase orders, engineering deliverables, lookahead grid) for .NET 10 Blazor WebApp (Interactive Server) on top of Syncfusion.Blazor. Proprietary — requires a commercial agreement with Cayaqui.

Fun.Blazor.ApexCharts

Package Description

GitHub repositories (9)

Showing the top 9 popular GitHub repositories that depend on Blazor-ApexCharts:

Repository Stars
Ozark-Connect/NetworkOptimizer
Self-hosted optimization, monitoring (NMS), and security audit tool for UniFi Networks. Includes Wi-Fi Optimizer for wireless health scoring and channel optimization, advanced DNS/VLAN/firewall security checks, config optimization suggestions, centralized WAN and LAN speed test server w/ L2 tracing, CM, ONT, SFP, 5G modem stats +more.​​​​​​​​​​​​​
neozhu/CleanArchitectureWithBlazorServer
This repository is designed to create an enterprise Blazor Server application that follows the principles of Clean Architecture and implements Blazor Clean Architecture best practices for scalability, maintainability, and testability.
TheAxelander/OpenBudgeteer
OpenBudgeteer is a budgeting app based on the Bucket Budgeting Principle
TabBlazor/TabBlazor
Blazor admin template based on Tabler UI
Sidekick-Poe/Sidekick
The main repository for the Sidekick project, a companion trade tool for Path of Exile and Path of Exile 2.
neozhu/visitormanagement
helps in managing visitors visiting the institutions for various reasons. It allows visitors to check-in digitally to eliminate the tedious registeration and other paperwork. Additionally, it also keeps a track of every individual inside the campus and their timings. Institutions has guards who enter their detail in some notebooks to keep a log which are practically impossible to reconcile. It is really unpleasent and hectic for visitor to stand at the gate and give details about the visit. To ease the process of registeration, Entry-In, Entry-Out, time tracking and logging the history, this VMS can be of great use!!
kaybi-gh/K7
Self-hosted media server for a small circle of family and friends.
dotnet/nuget-trends
Check out NuGet packages adoption and what's trending on NuGet.
pkuehnel/TeslaSolarCharger
A software to let your Tesla charge with solar energy ☀
Version Downloads Last Updated
8.0.0 1,817 11/8/2026
7.1.0 15,717 10/30/2026
7.0.0 367,332 7/24/2026
6.1.0 1,114,003 1/17/2026
6.0.2 444,405 8/22/2025
6.0.1 254,579 5/21/2025
6.0.0 108,411 4/28/2025
5.1.0 303,019 2/4/2025
5.0.1 79,450 1/8/2025
5.0.0 21,931 12/27/2024
4.0.1 86,952 11/19/2024
4.0.0 112,900 11/9/2024
3.5.0 155,479 10/8/2024
3.4.0 223,820 7/15/2024
3.3.0 152,367 4/28/2024
3.2.0 54,154 4/7/2024
3.1.0 73,527 3/4/2024
3.0.0 3,149 3/4/2024
2.3.3 66,451 2/9/2024
2.3.2 1,774 2/7/2024
Loading failed