How to register a plugin in PrimeVue Chart?

UI Components for Vue
Post Reply
TDZTechnika
Posts: 13
Joined: 02 Jun 2020, 13:43

20 Jan 2021, 12:43

Hi everyone

I am having problems with registering a plugin in Primevue Chart (https://www.primefaces.org/primevue/showcase-v2/#/chart)

Based on the documentation from Chart.js I need to register the plugin first (https://www.chartjs.org/docs/latest/dev ... ng-plugins)
Eg:

Code: Select all

var chart1 = new Chart(ctx, {
    plugins: [plugin]
});
If I simply use options without registering the plugin it doesn't work.

Code: Select all

options: {
    plugins: {
        ...my...plugin...settings...here...
Would be nice to mention it in the documentation . Thanks.

As an example I would like to register the following plugin: https://www.npmjs.com/package/chartjs-plugin-crosshair

Thanks for any help.


Post Reply

Return to “PrimeVue”

  • Information
  • Who is online

    Users browsing this forum: Baidu [Spider] and 2 guests