vue-chartjs
Advanced tools
Comparing version 2.4.1 to 2.5.0
# Change Log | ||
## [Unreleased](https://github.com/apertureless/vue-chartjs/tree/HEAD) | ||
[Full Changelog](https://github.com/apertureless/vue-chartjs/compare/v2.4.1...HEAD) | ||
**Closed issues:** | ||
- UglifyJs is not happy with versions after 2.3.8 [\#54](https://github.com/apertureless/vue-chartjs/issues/54) | ||
- Why "main" in Package.json is "src/index.js" and not "dist/vue-chartjs.js" [\#53](https://github.com/apertureless/vue-chartjs/issues/53) | ||
- Adding static data and dynamic data at the same time. [\#52](https://github.com/apertureless/vue-chartjs/issues/52) | ||
## [v2.4.1](https://github.com/apertureless/vue-chartjs/tree/v2.4.1) (2017-03-04) | ||
[Full Changelog](https://github.com/apertureless/vue-chartjs/compare/v2.4.0...v2.4.1) | ||
## [v2.4.0](https://github.com/apertureless/vue-chartjs/tree/v2.4.0) (2017-03-03) | ||
@@ -4,0 +17,0 @@ [Full Changelog](https://github.com/apertureless/vue-chartjs/compare/v2.3.9...v2.4.0) |
@@ -75,3 +75,3 @@ 'use strict'; | ||
this._chart = new _chart2.default(this.$refs.canvas.getContext('2d'), { | ||
type: type || 'bar', | ||
type: 'bar', | ||
data: data, | ||
@@ -78,0 +78,0 @@ options: chartOptions |
@@ -6,3 +6,3 @@ 'use strict'; | ||
}); | ||
exports.mixins = exports.Bubble = exports.Radar = exports.PolarArea = exports.Pie = exports.Line = exports.Doughnut = exports.Bar = exports.VueCharts = undefined; | ||
exports.mixins = exports.Bubble = exports.Radar = exports.PolarArea = exports.Pie = exports.Line = exports.Doughnut = exports.HorizontalBar = exports.Bar = exports.VueCharts = undefined; | ||
@@ -13,2 +13,6 @@ var _Bar = require('./BaseCharts/Bar'); | ||
var _HorizontalBar = require('./BaseCharts/HorizontalBar'); | ||
var _HorizontalBar2 = _interopRequireDefault(_HorizontalBar); | ||
var _Doughnut = require('./BaseCharts/Doughnut'); | ||
@@ -46,2 +50,3 @@ | ||
Bar: _Bar2.default, | ||
HorizontalBar: _HorizontalBar2.default, | ||
Doughnut: _Doughnut2.default, | ||
@@ -59,2 +64,3 @@ Line: _Line2.default, | ||
exports.Bar = _Bar2.default; | ||
exports.HorizontalBar = _HorizontalBar2.default; | ||
exports.Doughnut = _Doughnut2.default; | ||
@@ -61,0 +67,0 @@ exports.Line = _Line2.default; |
{ | ||
"name": "vue-chartjs", | ||
"version": "2.4.1", | ||
"version": "2.5.0", | ||
"description": "vue.js wrapper for chart.js", | ||
@@ -5,0 +5,0 @@ "author": "Jakub Juszczak <jakub@posteo.de>", |
@@ -180,25 +180,16 @@ <div align="center"> | ||
## Webpack & Bundling tools | ||
There are now two version the main entry point is `src/index.js` which is the ES6 source, unbundled. | ||
If you're using webpack it is recommended to use this one. Because the bundled umd version has vue.js and chart.js bundled into it. | ||
## Webpack, Browserify and dist files. | ||
However if you have problems o you can import the dist file | ||
If you use `import VueCharts from 'vue-chartjs'` you will mostly import the UMD build of vue-chart.js | ||
This is because of compatibility reasons. This approach however has a downside: vue.js and chart.js are bundled into the file. | ||
And you end up with two vue instances. | ||
If you're using webpack 2 however, it will automatically import the transpiled ES sources. | ||
If you know what you're doing you can import directly from the transpiled es sources: | ||
``` | ||
import VueCharts from 'vue-chartjs/dist/vue-chartjs' | ||
// or | ||
import { Line } from 'vue-chartjs/dist/vue-chartjs' | ||
import { Line } from 'vue-chartjs/es' | ||
``` | ||
Or you can set an alias. | ||
### Browserify | ||
In order for a browserify user to transpile the code, they would need to install `babelify` and `babel-preset-es2015` and add a .babelrc file in the root of their project with the following code: | ||
``` | ||
{ | ||
"presets": ["es2015"] | ||
} | ||
``` | ||
## Available Charts | ||
@@ -205,0 +196,0 @@ |
@@ -68,3 +68,3 @@ import Vue from 'vue' | ||
this.$refs.canvas.getContext('2d'), { | ||
type: type || 'bar', | ||
type: 'bar', | ||
data: data, | ||
@@ -71,0 +71,0 @@ options: chartOptions |
import Bar from './BaseCharts/Bar' | ||
import HorizontalBar from './BaseCharts/HorizontalBar' | ||
import Doughnut from './BaseCharts/Doughnut' | ||
@@ -12,2 +13,3 @@ import Line from './BaseCharts/Line' | ||
Bar, | ||
HorizontalBar, | ||
Doughnut, | ||
@@ -27,2 +29,3 @@ Line, | ||
Bar, | ||
HorizontalBar, | ||
Doughnut, | ||
@@ -29,0 +32,0 @@ Line, |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4599840
53
39678
259