BlazorCharts 0.4.108

dotnet add package BlazorCharts --version 0.4.108
                    
NuGet\Install-Package BlazorCharts -Version 0.4.108
                    
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="BlazorCharts" Version="0.4.108" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BlazorCharts" Version="0.4.108" />
                    
Directory.Packages.props
<PackageReference Include="BlazorCharts" />
                    
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 BlazorCharts --version 0.4.108
                    
#r "nuget: BlazorCharts, 0.4.108"
                    
#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 BlazorCharts@0.4.108
                    
#: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=BlazorCharts&version=0.4.108
                    
Install as a Cake Addin
#tool nuget:?package=BlazorCharts&version=0.4.108
                    
Install as a Cake Tool

blazor-charts

无标题

基于blazor技术,使用C#编写的web前端charts组件。

DemoSite: https://victorious-meadow-0c2078000.azurestaticapps.net/

Build NuGet
alternate text is missing from this package README image alternate text is missing from this package README image

特点

✨ 完全使用C#语言编写

✨ 使用Razor语法定义图表

✨ 图表组件灵活组合使用

使用方法

  1. 安装组件包

  2. 修改_Imports.razor文件,添加引用@using BlazorCharts

  3. 页面中使用

<BcChart Height="600" Width="800" Data="DemoData.Githubs" CategoryField="x=>x.Year.ToString()">
	<BcTitle Title="图表示例" TData="Github"></BcTitle>
	<BcAxesY TData="Github" GridLineMajor="true" GridLineMinor="true"></BcAxesY>
	<BcLegend TData="Github" BorderWidth="1" Position="LegendPosition.Bottom"></BcLegend>
	<BcColumnSeries TData="Github" ValueFunc="x=>x.Sum(y=>y.View)" GroupName="View"></BcColumnSeries>
	<BcColumnSeries TData="Github" ValueFunc="x=>x.Sum(y=>y.Start)" GroupName="Start"></BcColumnSeries>
	<BcLineSeries TData="Github" ValueFunc="x=>x.Sum(y=>y.Fork)" GroupName="Fork" IsSecondaryAxis="true"></BcLineSeries>
</BcChart>
string title = "图表示例";

List<Github> githubs = new List<Github>()
{
    new Github(){Year=2017,View =2500,Start=800,Fork=400},
    new Github(){Year=2018,View =2200,Start=900,Fork=800},
    new Github(){Year=2019,View =2800,Start=1100,Fork=700},
    new Github(){Year=2020,View =2600,Start=1400,Fork=900},
};


public class Github
{
    public int Year { get; set; }
    public int View { get; set; }
    public int Start { get; set; }
    public int Fork { get; set; }
}
  1. 执行查看效果

image

更新日志

2021.1116

  • 升级.Net6
  • 支持基于上级组件推断泛型类型特性

2021.0525

  • 增加自定义数据源功能,默认提供ListDataSource和RemoteDataSource两种类型的数据源

2021.0520

  • X轴和Y轴增加隐藏功能
  • Y轴增加次要轴功能

2021.0514

  • 支持某个字段作为分组依据进行分组
  • 增加基本的数据筛选支持

2021.0509

  • 柱状图和点的图增加动画
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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 was computed.  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 was computed.  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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.4.108 730 1/8/2022
0.3.0-pre-211116130523 243 11/16/2021
0.3.0-pre-211116130509 231 11/16/2021
0.3.0-pre-210623123916 256 6/23/2021
0.3.0-pre-210623123854 252 6/23/2021
0.3.0-pre-210526142824 226 5/26/2021
0.3.0-pre-210526142651 219 5/26/2021
0.3.0-pre-210526142647 222 5/26/2021
0.3.0-pre-210525164804 252 5/25/2021
0.3.0-pre-210525155247 218 5/25/2021
0.3.0-pre-210525155216 221 5/25/2021
0.3.0-pre-210523140611 219 5/23/2021
0.3.0-pre-210523140450 215 5/23/2021
0.3.0-pre-210521022539 242 5/21/2021
0.3.0-pre-210521022535 237 5/21/2021
0.3.0-pre-210520145941 222 5/20/2021
0.3.0-pre-210520145729 219 5/20/2021
0.3.0-pre-210514084655 225 5/14/2021
0.3.0-pre-210514084648 222 5/14/2021
0.3.0-pre-210514083006 221 5/14/2021
0.3.0-pre-210514083000 221 5/14/2021
0.3.0-pre-210514060330 227 5/14/2021
0.3.0-pre-210514055317 229 5/14/2021
0.3.0-pre-210514030050 224 5/14/2021
0.3.0-pre-210514030042 224 5/14/2021
0.3.0-pre-210509103713 230 5/9/2021
0.3.0-pre-210506123416 271 5/6/2021
0.3.0-pre-210506112811 243 5/6/2021
0.3.0-pre-210506104829 240 5/6/2021
0.3.0-pre-210501084829 253 5/1/2021
0.3.0-pre-210501084217 248 5/1/2021
0.3.0-pre-210501071656 276 5/1/2021
0.2.0-pre-210430225846 256 4/30/2021
0.2.0-pre-210430141104 219 4/30/2021
0.2.0-pre-210430045457 252 4/30/2021
0.2.0-pre-210430.234038 257 4/30/2021
0.1.0-pre-210429143532 225 4/29/2021
0.1.0-pre-210428143055 225 4/28/2021
0.1.0-pre-210428141100 224 4/28/2021
0.1.0-pre-210428123524 246 4/28/2021
0.1.0-pre-210428121832 214 4/28/2021
0.1.0-pre-210428083341 221 4/28/2021
0.1.0-pre-210428080227 229 4/28/2021
0.1.0-pre-210428061416 227 4/28/2021
0.1.0-pre-210428061326 234 4/28/2021
0.1.0-pre-210428055944 227 4/28/2021