Releases: apertureless/vue-chartjs
Releases Β· apertureless/vue-chartjs
π Release new version 3.4.2
π Release new version 3.4.1
π Release new version 3.4.0
π Release new version 3.3.2
π Release new version 3.3.1
π Release new version 3.3.0
Changelog
Bug Fixes
- readme: Update paypal donate button (bfda218)
Features
- charts: Export generateChart to create custom charts (50e5644)
- docs: Update docs with custom chart example (3247a61)
π¨βπ« Custom Charts
You can now extend Chart.js chart types and modify them or create new chart types.
// 1. Import Chart.js so you can use the global Chart object
import Chart from 'chart.js'
// 2. Import the `generateChart()` method to create the vue component.
import { generateChart } from 'vue-chartjs'
// 3. Extend on of the default charts
// http://www.chartjs.org/docs/latest/developers/charts.html
Chart.defaults.LineWithLine = Chart.defaults.line;
Chart.controllers.LineWithLine = Chart.controllers.line.extend({ /* custom magic here */})
// 4. Generate the vue-chartjs component
// First argument is the chart-id, second the chart type.
const CustomLine = generateChart('custom-line', 'LineWithLine')
// 5. Extend the CustomLine Component just like you do with the default vue-chartjs charts.
export default {
extends: CustomLine,
mounted () {
// ....
}
}
π Release new version 3.2.1
π Fixed
- Breaking build #310
π Release new version 3.2.0
Features
- Refactor identical code #305 Thanks to @nickknissen
- Add js sourcemaps for
vue-chartjs.js
andvue-chartjs.min.js
With the refactor vue-chartjs
is even smaller now.
File | Before | After |
---|---|---|
vue-chartjs.js | 15.9 KB | 11.9 KB |
vue-chartjs.min.js | 7.49 KB | 3.49 KB |
π Release new version 3.1.1
Refactor
Big thanks to @nickknissen for #303 which DRY out the code of vue-chartjs
and reduced the filesize!
The gzipped version is now 2.25 KB
File | Before | Now | gzip |
---|---|---|---|
vue-chartjs.js | 26.7 KB | 15.9 KB | 4.03 KB |
vue-chartjs.min.js | 13 KB | 7.49 KB | 2.25 KB |