You can download the latest version of [Chart.js on GitHub](https://github.com/chartjs/Chart.js/releases/latest) or just use these [Chart.js CDN](https://cdnjs.com/libraries/Chart.js) links.
-To install via npm / bower:
+To install via npm:
```bash
npm install chart.js --save
-bower install Chart.js --save
```
+To Install via bower, please follow [these instructions](http://www.chartjs.org/docs/#getting-started-installation).
+
## Documentation
You can find documentation at [www.chartjs.org/docs](http://www.chartjs.org/docs). The markdown files that build the site are available under `/docs`. Previous version documentation is available at [www.chartjs.org/docs/#notes-previous-versions](http://www.chartjs.org/docs/#notes-previous-versions).
### Installation
-To install via npm / bower:
+#### npm
```bash
npm install chart.js --save
```
+
+#### bower
+
+Bower support has been dropped since version 2.2.0 but you can still use Chart.js with Bower thanks to [bower-npm-resolver](https://www.npmjs.com/package/bower-npm-resolver).
+
+First, add the resolver in your .bowerrc file:
+```json
+{
+ "resolvers": [
+ "bower-npm-resolver"
+ ]
+}
+```
+
+Then:
+
```bash
-bower install Chart.js --save
+npm install -g bower-npm-resolver
+bower install npm:chart.js --save
```
### Selecting the Correct Build
The `Chart.bundle.js` and `Chart.bundle.min.js` builds include Moment.js in a single file. This version should be used if you require time axes and want a single file to include, select this version. Do not use this build if your application already includes Moment.js. If you do, Moment.js will be included twice, increasing the page load time and potentially introducing version issues.
-### Installation
+### Usage
To import Chart.js using an old-school script tag:
exec = require('child_process').exec,
fs = require('fs'),
package = require('./package.json'),
- bower = require('./bower.json'),
karma = require('gulp-karma'),
browserify = require('browserify'),
streamify = require('gulp-streamify'),
/*
* Usage : gulp bump
* Prompts: Version increment to bump
- * Output: - New version number written into package.json & bower.json
+ * Output: - New version number written into package.json
*/
function bumpTask(complete) {
util.log('Current version:', util.colors.cyan(package.version));
newVersion = semver.inc(package.version, increment),
oldVersion = package.version;
- // Set the new versions into the bower/package object
+ // Set the new versions into the package object
package.version = newVersion;
- bower.version = newVersion;
// Write these to their own files, then build the output
fs.writeFileSync('package.json', JSON.stringify(package, null, 2));
- fs.writeFileSync('bower.json', JSON.stringify(bower, null, 2));
var oldCDN = 'https://cdnjs.cloudflare.com/ajax/libs/Chart.js/'+oldVersion+'/Chart.min.js',
newCDN = 'https://cdnjs.cloudflare.com/ajax/libs/Chart.js/'+newVersion+'/Chart.min.js';