GithubHelp home page GithubHelp logo

jevonsflash / echartsgen Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 0.0 1.12 MB

纯后端ECharts库

Home Page: https://blog.csdn.net/jevonsflash

License: MIT License

C# 51.71% JavaScript 48.29%
echarts npoi phantomjs

echartsgen's Introduction

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文档

已知问题

作者信息

作者:林小

邮箱:[email protected]

License

The MIT License (MIT)

echartsgen's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.