VueChart.js with inline plugins example
See original GitHub issueHi guys, it might not be the place to ask this kind of question, but as a newbie, I don’t really understand how to use plugins …
I’d like to add this plugin PieceLabel to my component below.
export default {
name: 'pie-chart',
mixins: [reactiveProp],
extends: Pie,
props: {
options: Object,
chartData: Object,
},
mounted() {
const { options, chartData, renderChart } = this
this.addPlugin({
id: 'pieceLabel',
beforeInit: function (chart) {
console.log(chart)
}
})
options: {
pieceLabel: {
mode: 'label',
precision: 1
},
}
renderChart(chartData, params)
},
}
The issue is how does it recognize the id ?? Thanks a lot
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Plugins | Chart.js
Copied! Plugins can also be defined directly in the chart plugins config (a.k.a. inline plugins):. WARNING. inline plugins are not registered.
Read more >Using inline plugins · Issue #130 · apertureless/vue-chartjs
I tried doing something like this: this.renderChart(this.datacollection, { responsive: true, maintainAspectRatio: true, legend: { display: false ...
Read more >Getting Started - vue-chartjs
Getting Started #. vue-chartjs is a wrapper for Chart.js in Vue. You can easily create reuseable chart components. Supports Chart.js v4.
Read more >vue-chartjs examples - CodeSandbox
Learn how to use vue-chartjs by viewing and forking example apps that make use of vue-chartjs on CodeSandbox. apertureless/vue-chartjs: bar.
Read more >How to import and use a custom Chart.js plugin in Nuxt ...
The second way is an inline plugin. This needs to be done in your BarChart.vue and goes like this: mounted() { this.addPlugin( Chart....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I guess you are using this one? https://github.com/chartjs/chartjs-plugin-annotation
Well, they say:
So have you tried this?
you are a marvellous person.