{"id":16237590,"url":"https://github.com/vowstar/gitbook-plugin-echarts","last_synced_at":"2025-03-19T16:30:21.197Z","repository":{"id":138346120,"uuid":"70590775","full_name":"vowstar/gitbook-plugin-echarts","owner":"vowstar","description":"echarts honkit/gitbook plug-in that can draw various charts such as bar/pie","archived":false,"fork":false,"pushed_at":"2024-10-30T04:55:26.000Z","size":1034,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-30T07:28:12.907Z","etag":null,"topics":["echarts","gitbook","honkit","honkit-plugin"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vowstar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-11T12:26:15.000Z","updated_at":"2024-10-30T04:50:04.000Z","dependencies_parsed_at":"2023-12-19T05:01:51.712Z","dependency_job_id":"d3931225-7d36-45c8-984e-eefb47bce658","html_url":"https://github.com/vowstar/gitbook-plugin-echarts","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vowstar%2Fgitbook-plugin-echarts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vowstar%2Fgitbook-plugin-echarts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vowstar%2Fgitbook-plugin-echarts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vowstar%2Fgitbook-plugin-echarts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vowstar","download_url":"https://codeload.github.com/vowstar/gitbook-plugin-echarts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244463542,"owners_count":20456906,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["echarts","gitbook","honkit","honkit-plugin"],"created_at":"2024-10-10T13:36:15.553Z","updated_at":"2025-03-19T16:30:20.795Z","avatar_url":"https://github.com/vowstar.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gitbook-plugin-echarts\n\n[![Build Status](https://github.com/vowstar/gitbook-plugin-echarts/actions/workflows/test.yml/badge.svg)](https://github.com/vowstar/gitbook-plugin-echarts/actions)\n[![Coverage Status](https://coveralls.io/repos/github/vowstar/gitbook-plugin-echarts/badge.svg?branch=master)](https://coveralls.io/github/vowstar/gitbook-plugin-echarts?branch=master)\n[![NPM Version](https://img.shields.io/npm/v/gitbook-plugin-echarts.svg?style=flat)](https://www.npmjs.org/package/gitbook-plugin-echarts)\n[![NPM Downloads](https://img.shields.io/npm/dm/gitbook-plugin-echarts.svg?style=flat)](https://www.npmjs.org/package/gitbook-plugin-echarts)\n\n[echarts](http://echarts.baidu.com/) plugin for [Honkit](https://github.com/honkit/honkit) ~~and [GitBook](https://github.com/GitbookIO/gitbook)~~.\n\n## Installation\n\n```bash\nnpm install gitbook-plugin-echarts\n```\n\nAdd this plugin into ``book.json``.\n\n```json\n{\n  \"plugins\": [\"echarts\"]\n}\n```\n\n## Features\n\n* Support HTML, PDF, EPUB output(make sure your gitbook support SVG)\n* Support ```chart code block quote\n* Multi code style support\n\n### Beautiful Chat\n\n![Bar chat](images/bar.svg)\n![Pie chat](images/pie.svg)\n\n## Configuration\n\nbook.json add the echarts options\n\n```json\n\"pluginsConfig\": {\n  \"chart\": {\n\n  }\n}\n```\n\n## Usage\n\n\nTo include a echarts diagram, just wrap your definition in a \"chart\" code block. For example:\n\n\u003cpre lang=\"no-highlight\"\u003e\u003ccode\u003e```chart\n{\n    \"title\": {\n        \"text\": \"Fruits number\"\n    },\n    \"tooltip\": {},\n    \"legend\": {\n        \"data\":[\"Number\"]\n    },\n    \"xAxis\": {\n        \"data\": [\"Apple\",\"Banana\",\"Peach\",\"Pear\",\"Grape\",\"Kiwi\"]\n    },\n    \"yAxis\": {},\n    \"series\": [{\n        \"name\": \"Number\",\n        \"type\": \"bar\",\n        \"data\": [5, 20, 36, 10, 10, 20]\n    }]\n}\n```\n\u003c/code\u003e\u003c/pre\u003e\n\nAlso you can put in your book block as\n\n```bash\n{% chart %}\n{\n    \"title\": {\n        \"text\": \"Fruits number\"\n    },\n    \"tooltip\": {},\n    \"legend\": {\n        \"data\":[\"Number\"]\n    },\n    \"xAxis\": {\n        \"data\": [\"Apple\",\"Banana\",\"Peach\",\"Pear\",\"Grape\",\"Kiwi\"]\n    },\n    \"yAxis\": {},\n    \"series\": [{\n        \"name\": \"Number\",\n        \"type\": \"bar\",\n        \"data\": [5, 20, 36, 10, 10, 20]\n    }]\n}\n{% endechart %}\n```\n\n### Extend the width\n\nCode mode:\n\n\u003cpre lang=\"no-highlight\"\u003e\u003ccode\u003e```chart\n{\n    \"width\": \"900px\",\n    \"height\": \"500px\",\n    \"title\": {\n        \"text\": \"Fruits number\"\n    },\n    \"tooltip\": {},\n    \"legend\": {\n        \"data\":[\"Number\"]\n    },\n    \"xAxis\": {\n        \"data\": [\"Apple\",\"Banana\",\"Peach\",\"Pear\",\"Grape\",\"Kiwi\"]\n    },\n    \"yAxis\": {},\n    \"series\": [{\n        \"name\": \"Number\",\n        \"type\": \"bar\",\n        \"data\": [5, 20, 36, 10, 10, 20]\n    }]\n}\n```\n\u003c/code\u003e\u003c/pre\u003e\n\nTemplate mode:\n\n```bash\n{% chart width=\"800px\" height=\"800px\" %}\n```\n\n\u003e If use both configure method, the code configure will overwrite the template configure.\n\n## Learn echarts\n\n[echarts](https://echarts.apache.org)\n\n## Thanks\n\n* [midnightSuyama/gitbook-plugin-flowchart](https://github.com/midnightSuyama/gitbook-plugin-flowchart).\n* [midnightSuyama/gitbook-plugin-sequence-diagrams](https://github.com/midnightSuyama/gitbook-plugin-sequence-diagrams).\n* [massanek/gitbook-plugin-js-sequence-diagram](https://github.com/gmassanek/gitbook-plugin-js-sequence-diagram).\n* [nsdont/gitbook-plugin-new-flowchart](https://github.com/nsdont/gitbook-plugin-new-flowchart).\n* [lyhcode/gitbook-plugin-plantuml](https://github.com/lyhcode/gitbook-plugin-plantuml).\n\n## See also\n\nThese plugins are also available on honkit.\n\n|                                    Plugin                                     |                      Description                       |\n| ----------------------------------------------------------------------------- | ------------------------------------------------------ |\n| [gitbook-plugin-uml](https://github.com/vowstar/gitbook-plugin-uml)           | A plug-in that use plantuml to draw beautiful pictures |\n| [gitbook-plugin-wavedrom](https://github.com/vowstar/gitbook-plugin-wavedrom) | A plug-in that can draw waveforms and register tables  |\n| [gitbook-plugin-sequence](https://github.com/vowstar/gitbook-plugin-sequence) | A plug-in that can draw sequence diagrams              |\n| [gitbook-plugin-flow](https://github.com/vowstar/gitbook-plugin-flow)         | A plug-in that can draw flowchart.js diagrams          |\n| [gitbook-plugin-echarts](https://github.com/vowstar/gitbook-plugin-echarts)   | A plug-in that can draw various charts such as bar/pie |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvowstar%2Fgitbook-plugin-echarts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvowstar%2Fgitbook-plugin-echarts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvowstar%2Fgitbook-plugin-echarts/lists"}