Skip to content

Commit cddb65a

Browse files
2024-06-12 - README fix
1 parent b792e77 commit cddb65a

1 file changed

Lines changed: 44 additions & 65 deletions

File tree

README.md

Lines changed: 44 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,58 @@
1-
<!-- markdownlint-disable -->
21
<div align="center" class="gh">
32

4-
# docsify-charty
5-
6-
<small style="margin-bottom:2em;">by Mark Battistella</small>
7-
8-
[![](https://img.shields.io/badge/%20-@markbattistella-blue?logo=paypal&style=for-the-badge)](https://www.paypal.me/markbattistella/6AUD) [![](https://img.shields.io/badge/%20-buymeacoffee-black?logo=buy-me-a-coffee&style=for-the-badge)](https://www.buymeacoffee.com/markbattistella)
9-
10-
:sparkles: [![](https://img.shields.io/badge/demo-@markbattistella/docsify--charty-1E5749?style=for-the-badge)](https://markbattistella.github.io/docsify-charty/) :sparkles:
3+
# docsify.js charty
114

125
</div>
136

14-
---
7+
This plugin enhances your Docsify documentation by adding SVG charts to your website. It allows you to add in multiple types of charts, including pie, doughnut, sectional, radar, area, scatter, line, and bar types. By utilising this plugin, you can easily show your data in a beautiful interface.
158

169
## Installation
1710

1811
### Update `index.html` file
1912

20-
1. Add the following script and stylesheet to your `index.html` via either CDN or downloading it and using it locally:
21-
22-
**unpkg.com**
23-
24-
```html
25-
<script src="//unpkg.com/@markbattistella/docsify-charty@latest/dist/docsify-charty.min.js"></script>
26-
<link rel="stylesheet" href="//unpkg.com/@markbattistella/docsify-charty@latest/dist/docsify-charty.min.css">
27-
```
13+
Assuming you have a working [docsify](https://docsify.js.org/) framework set up, it is easy to use the plugin.
2814

29-
**jsDelivr.com**
15+
1. Add the following script and stylesheet to your `index.html` via either CDN or downloading it and using it locally:
3016

3117
```html
32-
<script src="//cdn.jsdelivr.net/npm/@markbattistella/docsify-charty@latest"></script>
33-
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@markbattistella/docsify-charty@latest/dist/docsify-charty.min.css">
34-
```
18+
<!-- unpkg.com -->
19+
<script src="https://unpkg.com/@markbattistella/docsify-charty@latest/dist/docsify-charty.min.js"></script>
20+
<link rel="stylesheet" href="https://unpkg.com/@markbattistella/docsify-charty@latest/dist/docsify-charty.min.css">
3521

36-
**locally**
22+
<!-- jsDelivr -->
23+
<script src="https://cdn.jsdelivr.net/npm/@markbattistella/docsify-charty@latest"></script>
24+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@markbattistella/docsify-charty@latest/dist/docsify-charty.min.css">
3725

38-
```html
26+
<!-- locally -->
3927
<script src="docsify-charty.min.js"></script>
4028
<link rel="stylesheet" href="docsify-charty.min.css">
4129
```
4230

43-
1. In docsify setup configure the plugin (see [configuration](#configuration) for setup). These are the global settings and affect all charts:
31+
1. In docsify setup, configure the plugin:
4432

45-
```js
46-
window.$docsify = {
47-
charty: {
48-
"theme": String,
49-
"mode": String,
50-
"debug": Boolean
51-
}
52-
};
53-
```
33+
```js
34+
<script>
35+
window.$docsify = {
36+
charty: {
5437
55-
### npm install
38+
// Global theme for chart colours in HEX
39+
theme: '.',
5640
57-
Or if you're using `npm` to manage your dependencies:
41+
// Accepts "dark" or "light"
42+
mode: "light",
5843
59-
```sh
60-
npm i @markbattistella/docsify-charty
61-
```
44+
// Boolean to enable or disable debug messages
45+
debug: false
46+
}
47+
};
48+
</script>
49+
```
6250

6351
## Configuration
6452

65-
### Global settings
53+
There are several options available for the docsify-charty plugin:
6654

67-
> Example: [index.html](https://github.com/markbattistella/docsify-charty/blob/38573bff480009d5bbe7cdbbab12fe0474fa7407/index.html#L37-L40)
55+
> Example: [index.html](https://github.com/markbattistella/docsify-charty/blob/b792e7701e740587f48598c7b61bc7f7ea39c366/docs/index.html#L36-L40)
6856
6957
| Name | Type | Example | Description |
7058
|---------|-----------|-----------|-------------------------------------------|
@@ -109,63 +97,62 @@ npm i @markbattistella/docsify-charty
10997
}
11098
]
11199
}
112-
// close the code block
113-
// can't show it here
100+
\`\`\`
114101
```
115102

116103
## Types of charts
117104

118105
### Circular
119106

120-
#### pie
107+
#### Pie chart
121108

122109
![docsify-charty: pie](https://raw.githubusercontent.com/markbattistella/docsify-charty/main/docs/demo/pie.jpg)
123110

124-
#### donut / doughnut
111+
#### Donut / Doughnut chart
125112

126113
![docsify-charty: donut](https://raw.githubusercontent.com/markbattistella/docsify-charty/main/docs/demo/donut.jpg)
127114

128-
#### section / sectional
115+
#### Section / Sectional chart
129116

130117
![docsify-charty: section](https://raw.githubusercontent.com/markbattistella/docsify-charty/main/docs/demo/section.jpg)
131118

132-
#### rings
119+
#### Rings chart
133120

134121
![docsify-charty: rings](https://raw.githubusercontent.com/markbattistella/docsify-charty/main/docs/demo/rings.jpg)
135122

136123
### Area
137124

138-
#### radar
125+
#### Radar chart
139126

140127
![docsify-charty: radar](https://raw.githubusercontent.com/markbattistella/docsify-charty/main/docs/demo/radar.jpg)
141128

142-
#### area
129+
#### Area chart
143130

144131
![docsify-charty: area](https://raw.githubusercontent.com/markbattistella/docsify-charty/main/docs/demo/area.jpg)
145132

146133
### Plot
147134

148-
#### scatter
135+
#### Scatter chart
149136

150137
![docsify-charty: scatter](https://raw.githubusercontent.com/markbattistella/docsify-charty/main/docs/demo/scatter.jpg)
151138

152-
#### bubble
139+
#### Bubble chart
153140

154141
![docsify-charty: bubble](https://raw.githubusercontent.com/markbattistella/docsify-charty/main/docs/demo/bubble.jpg)
155142

156-
#### line
143+
#### Line chart
157144

158145
![docsify-charty: line](https://raw.githubusercontent.com/markbattistella/docsify-charty/main/docs/demo/line.jpg)<br>
159146
![docsify-charty: line](https://raw.githubusercontent.com/markbattistella/docsify-charty/main/docs/demo/line-stack.jpg)
160147

161148
### Bar / Column
162149

163-
### bar / bar-stack
150+
### Bar / Bar-stack chart
164151

165152
![docsify-charty: line](https://raw.githubusercontent.com/markbattistella/docsify-charty/main/docs/demo/bar.jpg)<br>
166153
![docsify-charty: line](https://raw.githubusercontent.com/markbattistella/docsify-charty/main/docs/demo/bar-stack.jpg)
167154

168-
### column / column-stack
155+
### Column / Column-stack chart
169156

170157
![docsify-charty: line](https://raw.githubusercontent.com/markbattistella/docsify-charty/main/docs/demo/column.jpg)<br>
171158
![docsify-charty: line](https://raw.githubusercontent.com/markbattistella/docsify-charty/main/docs/demo/column-stack.jpg)
@@ -176,20 +163,12 @@ npm i @markbattistella/docsify-charty
176163

177164
## Contributing
178165

179-
1. Clone the repo:
180-
181-
`git clone https://github.com/markbattistella/docsify-charty.git`
182-
183-
1. Create your feature branch:
184-
185-
`git checkout -b my-feature`
186-
187-
1. Commit your changes:
166+
1. Clone the repo: `git clone https://github.com/markbattistella/docsify-charty.git`
188167

189-
`git commit -am 'Add some feature'`
168+
1. Create your feature branch: `git checkout -b my-feature`
190169

191-
1. `Push` to the branch:
170+
1. Commit your changes: `git commit -am 'Add some feature'`
192171

193-
`git push origin my-new-feature`
172+
1. `Push` to the branch: `git push origin my-new-feature`
194173

195174
1. Submit the `pull` request

0 commit comments

Comments
 (0)