Releases: apertureless/vue-chartjs
💎 Release new version 3.0.2
Fixes
- Fixed the unpkg target in package.json
💎 Release new version 3.0.1
Dependency Cleanup
- Updated to current babel packages which are scoped with
@babel
- Added
@babel/preset-env
to automatically polyfill - Removed old babel presets
Build Script
Now there are only two dist files
vue-chartjs.js
vue-chartjs.min.js
With the webpack external fix, there is no need for two different builds.
Chart.js is defined as an external and peerDependency.
If you're using vue-chartjs
with Webpack no actions are required.
If you're using vue-chart
in the browser you will need to add the Chart.js CDN script.
💎 Release new version 3.0.0
💎 vue-chart.js v3
Finally version 3 of vue-chartjs is ready to 🚣 . We have some breaking changes, but they are easy to change!
✅ Removed Vue.extend()
in the base components #201
✅ Changed the private data from private instance to private data instance #182
✅ Updated peerDependencies
vue & chart.js
🔥 Breaking Changes!
🐣 Component creation
In v2
you were creating your own chart components by extending the base component like this:
import { Line } from 'vue-chartjs'
export default Line.extend({
....
})
This was possible because the base components had a export default Vue.extend({})
in it. Which creates a subclass of the vue ctor. vue docs
Because of this Vue needed to be included as a dependency and bundled into the package for the browser build.
This was causing a lot of confusing 😕 and also some weird errors #216, #151 and some more problems like increased bundle size and duplicated dependencies for browser build.
🔐 Chart instance
Like mentioned in #182 vue could possibly overwrite the private _chart
variable as it is saved as an unprotected instance variable. Now it makes usage of vue's private data notation.
⬆ 📖 Upgrade Guide
🐣 Component creation
Create your components now with either extends or mixins :
import { Line } from 'vue-chartjs'
export default {
extends: Line,
data () {...},
mounted () {
....
}
}
or
import { Line } from 'vue-chartjs'
export default {
mixins: [Line],
data () {...},
mounted () {
....
}
}
🔐 Chart instance
Replace this._chart
with this.$data._chart
Chart.js
Please also keep in mind the Chart.js 2.7.0 changes if you update your peerDependencies
💎 Release new version 2.8.7
Updated peer dependencies
💎 Release new version 2.8.6
💎 Release new version 2.8.5
💎 Release new version 2.8.4
💎 Release new version 2.8.3
Change Log
v2.8.3 (2017-09-06)
Closed issues:
- Rounded corner for Bar chart #185
- Access canvas object from parents #184
- Issue with DonutChart in Safari #183
- Responsive Width, Fixed Height #180
- Entire Lodash Library Is Loaded!! 200kb chunk! #179
- height changed unexpectedly after re-rendering #178
- Default height no longer working in 2.8 #176
- how to get click on point in bar chart? #175
- clean install of from npm cannot be used in gulp / browserify #174
- tooltip callbacks possible? #173
- Computed object won't populate chart #170
- Error in nextTick: "RangeError: Maximum call stack size exceeded" #169
- Standalone chartjs build (don't include moment.js) #124
Merged pull requests:
- 🔥 Remove default styles object as it causes problems #187 (apertureless)
- remvove lodash merge #186 (apertureless)
Lodash
Well, nothing too fancy this release. However lodash
got removed as a dependency as tree-shaking seemed not to work well. As only the merge
was needed, it got replaced with Object.assign
plus the babel-transform-object-assign
as a polyfill.
It drastically decreased the filesize:
Filesize comparision
File | 2.8.2 | 2.8.3 |
---|---|---|
vue-chartjs.js | 277 kB | 49.5 kB |
vue-chartjs.min.js | 71.5 kB | 22.3 kB |
vue-chartjs.full.js | 1.31 MB | 1.09 MB |
vue-chartjs.full.min.js | 499 kB | 450 kB |
💎 Release new version 2.8.2
💎 Release new version 2.8.1
Fix
- Change default height from 200% to 100% #164