# Blazor-ApexCharts
**Repository Path**: galacode/Blazor-ApexCharts
## Basic Information
- **Project Name**: Blazor-ApexCharts
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2024-01-16
- **Last Updated**: 2024-01-16
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README

# Blazor-ApexCharts
A blazor wrapper for [ApexCharts.js](https://apexcharts.com/)
## [Demo](https://apexcharts.github.io/Blazor-ApexCharts)
## v2.0 Released to production!
It's no longer necessary to manually include javascript files.
Please **REMOVE** any references to:
```html
```
---
As of version 2.0 javascript interop on WASM is running synchronously for better performance.
## Installation
### NuGet
[Blazor-ApexCharts](https://www.nuget.org/packages/Blazor-ApexCharts/)
```bash
dotnet add package Blazor-ApexCharts
```
## Usage
### Imports
Add a reference to `Blazor-ApexCharts` in your `_Imports.razor`
```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
```razor
@code {
private List 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](https://apexcharts.com/docs/options/).
## Acknowledgments
Credits to [@thirstyape](https://github.com/thirstyape) for making production release possible.
[](https://github.com/apexcharts/Blazor-ApexCharts/stargazers)