Skip to content

Make the module exportable #7

@koprivajakub

Description

@koprivajakub

Is there a way how to import your code into a react application without use of HTML <script> tag? I would like to use it in my application that is written in the react, but I am using the native chartjs on one page. I would like to have the option like with chartjs-plugin-datalabels that it will register itself once the module is imported:

import Chart from 'chart.js';
import ChartDataLabels from 'chartjs-plugin-datalabels.js';

and in case I need I can unregister it via:

Chart.plugins.unregister(ChartPluginStyle);

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions