markdown-it-plugin-echarts
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

markdown-it-echarts

Actions Status Actions Status

How to add Echarts support to Markdown-It

Use markdown-it-echarts as a regular plugin.

npm install markdown-it markdown-it-plantuml-online

Configure the markdown-it instance:

// node.js, "classic" way:
var echarts = require('markdown-it-plugin-echarts');
var MarkdownIt = require('markdown-it'),
    md = new MarkdownIt();
    md.use(echarts);   // md.use(plantuml, {..})   with options
var result = md.render(aMarkdownDocument);

Document including an echart graphic options in json or yaml format, like this:

xAxis:
  type: category
  data:
    - Mon
    - Tue
    - Wed
    - Thu
    - Fri
    - Sat
    - Sun
yAxis:
  type: value
series:
  - data:
      - 120
      - 200
      - 150
      - 80
      - 70
      - 110
      - 130
    type: bar
    showBackground: true
    backgroundStyle:
      color: 'rgba(180, 180, 180, 0.2)'

Code based on: https://github.com/christianvoigt/argdown/tree/master/packages/argdown-markdown-it-plugin

Package Sidebar

Install

npm i markdown-it-plugin-echarts

Weekly Downloads

17

Version

0.0.1

License

MIT

Unpacked Size

32.1 kB

Total Files

9

Last publish

Collaborators

  • tenuki