JSPM

markdown-it-plugin-echarts

0.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q32036F
  • License MIT

Include chart data in markdown files to be render with echarts library.

Package Exports

  • markdown-it-plugin-echarts

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (markdown-it-plugin-echarts) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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