EChartsGen 0.1.0

dotnet add package EChartsGen --version 0.1.0
NuGet\Install-Package EChartsGen -Version 0.1.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="EChartsGen" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EChartsGen --version 0.1.0
#r "nuget: EChartsGen, 0.1.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.
// Install EChartsGen as a Cake Addin
#addin nuget:?package=EChartsGen&version=0.1.0

// Install EChartsGen as a Cake Tool
#tool nuget:?package=EChartsGen&version=0.1.0

EChartsGen

在后端使用ECharts库,将ECharts图表Png图像文件导出到本地磁盘

EChartsGen

快速开始

在项目中引用EChartsGen

dotnet add package EChartsGen

指定一个option用于生成Echarts,option是一个json对象,用于配置图表的各个属性,从而定义图表的展示形式。详情请查看官网:https://echarts.apache.org/zh/option.html

Exporter exporter = new Exporter();
var pngPath = await exporter.ExportAsync(new EChartsGen.ExportOption() { ChartOptionPath = "D:\\option.json" });

ExportOption 说明

  • ChartOptionPath - Option的json文件路径
  • ChartOption - Option的.Net对象
  • Height - 图片高度
  • Width - 图片宽度

ChartOptionPath和ChartOption二选一,如果同时指定,优先使用ChartOptionPath。 图片的高度和宽度默认为1920*800,你可以根据实际情况调整。

示例

  1. 运行单元测试
  2. 前往EChartsGen_DocTemplateTool_Sample,查看使用文档模板生成工具将ECharts图形填充到Word文档

已知问题

作者信息

作者:林小

邮箱:jevonsflash@qq.com

License

The MIT License (MIT)

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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.1.0 212 11/15/2023