https://github.com/zingchart/gitbook-plugin-zingchart
ZingChart plugin for Gitbook
https://github.com/zingchart/gitbook-plugin-zingchart
Last synced: 6 months ago
JSON representation
ZingChart plugin for Gitbook
- Host: GitHub
- URL: https://github.com/zingchart/gitbook-plugin-zingchart
- Owner: zingchart
- License: mit
- Created: 2016-07-06T21:00:27.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2021-02-22T18:40:03.000Z (about 5 years ago)
- Last Synced: 2025-01-28T09:34:26.590Z (about 1 year ago)
- Language: JavaScript
- Size: 2.64 MB
- Stars: 2
- Watchers: 10
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 2021 UPDATE:
**This plugin is no longer maintained. It will not work with newer versions of GitBook. This repository exists purely for historical reasons. No further updates will be made.**
ZingChart integration for GitBook
==============
### 1. You can use install it via **NPM** and save it to package.json:
```
$ npm install gitbook-plugin-zingchart --save
```
### 2. add the plugin to `book.json` config
```
{
"plugins": [ "zingchart"]
}
```
### 3. include zingchart block in your markdown files.
```
{% zingchart width=300, height=300 %}
{
"type":"bar",
"series":[
{ "values": [35, 42, 67, 89]},
{ "values": [28, 40, 39, 36]}
]
}
{% endzingchart %}
```
* Any key/value pairs that can be specified in [zingchart.render](https://www.zingchart.com/docs/developers/zingchart-object-and-methods/?q=zingchart%20object%20and%20methods%20%7C%20developers%20%7C%20zingchart#render-method) can be declared in the `{% zingchart %}` block separated by commas.
* To include a raw JSON block, it can be placed between the open and close blocks.
* To include an external JSON file, the `dataurl` attribute can be placed in the `{% zingchart %}` block.
### Examples
```
{% zingchart dataurl='./zingchart.json', width=700, height=200 %}{% endzingchart %}
```

```
{% zingchart width=700, height=200 %}
{
"type":"bar",
"series":[
{ "values": [35, 42, 67, 89]},
{ "values": [28, 40, 39, 36]}
]
}
{% endzingchart %}
```
