https://github.com/tylingsoft/markdown-it-chart
Chart.js plugin for markdown-it.
https://github.com/tylingsoft/markdown-it-chart
Last synced: about 1 year ago
JSON representation
Chart.js plugin for markdown-it.
- Host: GitHub
- URL: https://github.com/tylingsoft/markdown-it-chart
- Owner: tylingsoft
- Created: 2017-04-01T11:53:42.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-12-18T14:39:00.000Z (over 8 years ago)
- Last Synced: 2024-04-24T15:23:52.370Z (about 2 years ago)
- Language: JavaScript
- Size: 81.1 KB
- Stars: 9
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# markdown-it-chart
Chart.js plugin for markdown-it.
## Installation
```
yarn install markdown-it-chart
```
## Usage
```js
import markdownIt from 'markdown-it'
import markdownItChart from 'markdown-it-chart'
const mdi = markdownIt()
mdi.use(markdownItChart)
mdi.render(`\`\`\`chart
{
"type": "pie",
"data": {
"labels": [
"Red",
"Blue",
"Yellow"
],
"datasets": [
{
"data": [
300,
50,
100
],
"backgroundColor": [
"#FF6384",
"#36A2EB",
"#FFCE56"
],
"hoverBackgroundColor": [
"#FF6384",
"#36A2EB",
"#FFCE56"
]
}
]
},
"options": {}
}
\`\`\``)
```
## Development
### Build
```
yarn build:watch
```
### Test
```
yarn test
```
### Distribution
```
yarn release && npm publish
```
## Todo