New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

gitbook-plugin-echarts

Package Overview
Dependencies
Maintainers
0
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitbook-plugin-echarts

Echarts chart plugin for GitBook

latest
Source
npmnpm
Version
2.0.0
Version published
Maintainers
0
Created
Source

gitbook-plugin-echarts

Build Status Coverage Status NPM Version NPM Downloads

echarts plugin for Honkit and GitBook.

Installation

npm install gitbook-plugin-echarts

Add this plugin into book.json.

{
  "plugins": ["echarts"]
}

Features

  • Support HTML, PDF, EPUB output(make sure your gitbook support SVG)
  • Support ```chart code block quote
  • Multi code style support

Beautiful Chat

Bar chat Pie chat

Configuration

book.json add the echarts options

"pluginsConfig": {
  "chart": {

  }
}

Usage

To include a echarts diagram, just wrap your definition in a "chart" code block. For example:

```chart
{
    "title": {
        "text": "Fruits number"
    },
    "tooltip": {},
    "legend": {
        "data":["Number"]
    },
    "xAxis": {
        "data": ["Apple","Banana","Peach","Pear","Grape","Kiwi"]
    },
    "yAxis": {},
    "series": [{
        "name": "Number",
        "type": "bar",
        "data": [5, 20, 36, 10, 10, 20]
    }]
}
```

Also you can put in your book block as

{% chart %}
{
    "title": {
        "text": "Fruits number"
    },
    "tooltip": {},
    "legend": {
        "data":["Number"]
    },
    "xAxis": {
        "data": ["Apple","Banana","Peach","Pear","Grape","Kiwi"]
    },
    "yAxis": {},
    "series": [{
        "name": "Number",
        "type": "bar",
        "data": [5, 20, 36, 10, 10, 20]
    }]
}
{% endechart %}

Extend the width

Code mode:

```chart
{
    "width": "900px",
    "height": "500px",
    "title": {
        "text": "Fruits number"
    },
    "tooltip": {},
    "legend": {
        "data":["Number"]
    },
    "xAxis": {
        "data": ["Apple","Banana","Peach","Pear","Grape","Kiwi"]
    },
    "yAxis": {},
    "series": [{
        "name": "Number",
        "type": "bar",
        "data": [5, 20, 36, 10, 10, 20]
    }]
}
```

Template mode:

{% chart width="800px" height="800px" %}

If use both configure method, the code configure will overwrite the template configure.

Learn echarts

echarts

Thanks

See also

These plugins are also available on honkit.

PluginDescription
gitbook-plugin-umlA plug-in that use plantuml to draw beautiful pictures
gitbook-plugin-wavedromA plug-in that can draw waveforms and register tables
gitbook-plugin-sequenceA plug-in that can draw sequence diagrams
gitbook-plugin-flowA plug-in that can draw flowchart.js diagrams
gitbook-plugin-echartsA plug-in that can draw various charts such as bar/pie

Keywords

echarts

FAQs

Package last updated on 30 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts