Skip to content

Commit 4bf12e0

Browse files
committed
Make requested changes to installation docs
1 parent 4360e0e commit 4bf12e0

File tree

1 file changed

+22
-27
lines changed

1 file changed

+22
-27
lines changed

docs/getting-started/installation.md

Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# Installation
2+
Chart.js can be installed via npm or bower. It is recommended to get Chart.js this way.
23

34
## Package Manager
45

5-
Chart.js can be installed via npm or bower. It is recommended to get Chart.js this way.
6-
76
### npm
87
[![npm](https://img.shields.io/npm/v/chart.js.svg?style=flat-square&maxAge=600)](https://npmjs.com/package/chart.js)
98
[![npm](https://img.shields.io/npm/dm/chart.js.svg?style=flat-square&maxAge=600)](https://npmjs.com/package/chart.js)
@@ -21,45 +20,41 @@ bower install chart.js --save
2120

2221
## CDN
2322

24-
### Selecting the Correct Build
25-
26-
Chart.js provides two different builds for you to choose: **Stand-Alone Build**, **Bundled Build**.
27-
28-
#### Stand-Alone Build
29-
Files:
30-
* `dist/Chart.js`
31-
* `dist/Chart.min.js`
32-
33-
The stand-alone build includes Chart.js as well as the color parsing library. If this version is used, you are required to include [Moment.js](https://momentjs.com/) before Chart.js for the functionality of the time axis.
34-
35-
#### Bundled Build
36-
Files:
37-
* `dist/Chart.bundle.js`
38-
* `dist/Chart.bundle.min.js`
39-
40-
The bundled build includes Moment.js in a single file. You should use this version if you require time axes and want to include a single file. You should not use this build if your application already included Moment.js. Otherwise, Moment.js will be included twice which results in increasing page load time and possible version compatibility issues. The Moment.js version in the bundled build is private to Chart.js so if you want to use Moment.js yourself, it's better to use Chart.js (non bundled) and import Moment.js manually.
41-
42-
### CDNs
43-
44-
Chart.js is available on the following CDNs
45-
46-
#### CDNJS
23+
### CDNJS
4724
[![cdnjs](https://img.shields.io/cdnjs/v/Chart.js.svg?style=flat-square&maxAge=600)](https://cdnjs.com/libraries/Chart.js)
4825

4926
Chart.js built files are available on [CDNJS](https://cdnjs.com/):
5027

5128
https://cdnjs.com/libraries/Chart.js
5229

53-
#### jsDelivr
30+
### jsDelivr
5431
[![jsdelivr](https://img.shields.io/npm/v/chart.js.svg?label=jsdelivr&style=flat-square&maxAge=600)](https://cdn.jsdelivr.net/npm/chart.js@latest/dist/) [![jsdelivr hits](https://data.jsdelivr.com/v1/package/npm/chart.js/badge)](https://www.jsdelivr.com/package/npm/chart.js)
5532

5633
Chart.js built files are also available through [jsDelivr](https://www.jsdelivr.com/):
5734

5835
https://www.jsdelivr.com/package/npm/chart.js?path=dist
5936

60-
#### Github
37+
## Github
6138
[![github](https://img.shields.io/github/release/chartjs/Chart.js.svg?style=flat-square&maxAge=600)](https://github.com/chartjs/Chart.js/releases/latest)
6239

6340
You can download the latest version of [Chart.js on GitHub](https://github.com/chartjs/Chart.js/releases/latest).
6441

6542
If you download or clone the repository, you must [build](../developers/contributing.md#building-and-testing) Chart.js to generate the dist files. Chart.js no longer comes with prebuilt release versions, so an alternative option to downloading the repo is **strongly** advised.
43+
44+
## Selecting the Correct Build
45+
46+
Chart.js provides two different builds for you to choose: **Stand-Alone Build**, **Bundled Build**.
47+
48+
### Stand-Alone Build
49+
Files:
50+
* `dist/Chart.js`
51+
* `dist/Chart.min.js`
52+
53+
The stand-alone build includes Chart.js as well as the color parsing library. If this version is used, you are required to include [Moment.js](https://momentjs.com/) before Chart.js for the functionality of the time axis.
54+
55+
### Bundled Build
56+
Files:
57+
* `dist/Chart.bundle.js`
58+
* `dist/Chart.bundle.min.js`
59+
60+
The bundled build includes Moment.js in a single file. You should use this version if you require time axes and want to include a single file. You should not use this build if your application already included Moment.js. Otherwise, Moment.js will be included twice which results in increasing page load time and possible version compatibility issues. The Moment.js version in the bundled build is private to Chart.js so if you want to use Moment.js yourself, it's better to use Chart.js (non bundled) and import Moment.js manually.

0 commit comments

Comments
 (0)