Stripped personal data from development repository
Samo Penic
2019-02-20 83c3f647c35477564b77cbc5b36d37d793d5442a
commit | author | age
83c3f6 1 # Installation
SP 2 Chart.js can be installed via npm or bower. It is recommended to get Chart.js this way.
3
4 ## npm
5 [![npm](https://img.shields.io/npm/v/chart.js.svg?style=flat-square&maxAge=600)](https://npmjs.com/package/chart.js)
6 [![npm](https://img.shields.io/npm/dm/chart.js.svg?style=flat-square&maxAge=600)](https://npmjs.com/package/chart.js)
7
8 ```bash
9 npm install chart.js --save
10 ```
11
12 ## Bower
13 [![bower](https://img.shields.io/bower/v/chartjs.svg?style=flat-square&maxAge=600)](https://libraries.io/bower/chartjs)
14
15 ```bash
16 bower install chart.js --save
17 ```
18
19 ## CDN
20 ### CDNJS
21 [![cdnjs](https://img.shields.io/cdnjs/v/Chart.js.svg?style=flat-square&maxAge=600)](https://cdnjs.com/libraries/Chart.js)
22
23 Chart.js built files are available on [CDNJS](https://cdnjs.com/):
24
25 https://cdnjs.com/libraries/Chart.js
26
27 ### jsDelivr
28 [![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)
29
30 Chart.js built files are also available through [jsDelivr](http://www.jsdelivr.com/):
31
32 https://www.jsdelivr.com/package/npm/chart.js?path=dist
33
34 ## Github
35 [![github](https://img.shields.io/github/release/chartjs/Chart.js.svg?style=flat-square&maxAge=600)](https://github.com/chartjs/Chart.js/releases/latest)
36
37 You can download the latest version of [Chart.js on GitHub](https://github.com/chartjs/Chart.js/releases/latest).
38
39 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.
40
41 # Selecting the Correct Build
42
43 Chart.js provides two different builds for you to choose: `Stand-Alone Build`, `Bundled Build`.
44
45 ## Stand-Alone Build
46 Files:
47 * `dist/Chart.js`
48 * `dist/Chart.min.js`
49
50 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](http://momentjs.com/) before Chart.js for the functionality of the time axis.
51
52 ## Bundled Build
53 Files:
54 * `dist/Chart.bundle.js`
55 * `dist/Chart.bundle.min.js`
56
57 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 compatability 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.