Giter Club home page Giter Club logo

bionics's Introduction

Bionics

Bionic是一个后端图表生成服务,具备将前端图表在无需Headless浏览器的条件下,在服务端生成图片,并返回给客户端:

  • 支持生成EChart图片

调用示例

生成EChart图片

参数说明

参数 描述 必填 默认值 备注
options Echart的图表Options
width Canvas宽度 500 Canvas的大小会生成的速度
height Canvas高度 200 Canvas的大小会生成的速度
theme Echart的主题 westeros
fontSize Canvas字体大小 12
mode 返回的图片形式 base64 可选 base64/stream, Base64模式下,图片会被编码为Base64返回调用端,Stream模式下,图片会直接以stream的模式返回

示例

curl --location --request POST --X POST 'http://127.0.0.1:7001/echart/generate' \
--header 'User-Agent: Apipost client Runtime/+https://www.apipost.cn/' \
--header 'Content-Type: application/json' \
--data '{
	"options":{
      "xAxis": {
        "type": "category",
        "boundaryGap": false,
        "data": [ "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" ]
      },
      "yAxis": {
        "type": "value"
      },
      "series": [
        {
          "data": [ 820, 932, 901, 934, 1290, 1330, 1320 ],
          "type": "line",
          "areaStyle": {}
        }
      ]
    }
}'

生成的样例图表为

示例图片

bionics's People

Contributors

ericchencw avatar etherfurnace avatar xiaomaijiang avatar

Stargazers

 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.