Import plugin
See original GitHub issueIs it possible to integrate a plugin into react-chartjs? For example https://github.com/xch89820/Chart.Funnel.js
I tried using
Chart.pluginService.register({
// something
});
with no success.
Issue Analytics
- State:
- Created 6 years ago
- Comments:32
Top Results From Across the Web
eslint-plugin-import - npm
This plugin intends to support linting of ES2015+ (ES6+) import/export syntax, and prevent issues with misspelling of file paths and import ...
Read more >Import any XML or CSV File to WordPress – WordPress plugin
WP All Import is an extremely powerful importer that makes it easy to import any XML or CSV file to WordPress.
Read more >WP All Import: WordPress XML & CSV Importer Plugin
The best import export plugin for WordPress & WooCommerce. Complete, granular control of your data with an easy to use drag & drop...
Read more >7 WordPress Import Plugins for Simple Site Migrations
Explore the seven best WordPress plugins to easily import data to or export data from your WordPress website.
Read more >Importing a Plugin - IBM
On the Plugin Manager page (Engine > Plugins), click Import Plugin. The Upload an Action Plugin File for Import dialog appears. · Click...
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
@brianbolnick I had the same question about the Data Labels plugin and got it to work, though maybe not precisely how it was intended.
npm install chartjs-plugin-datalabels
The documentation had no references (that I saw) as to the proper way to import and use it via npm, so I just tried
import 'chartjs-plugin-datalabels'
in the container component that held my charts.Voila! Data labels on my charts.
After that, you can pass the
plugins
property to your options object for your chart, and set things how you like according to the docsThis is the simplest solution I’ve found so far.
That method is not working for me with: ‘chartjs-plugin-annotation’
import ‘chartjs-plugin-annotation’; …
<Line … options={{ maintainAspectRatio: false, lineTension: 0, … plugins:{ annotation: { events: [“click”], annotations: [ { drawTime: “afterDatasetsDraw”, id: “hline”, type: “line”, mode: “horizontal”, scaleID: “y-axis-0”, value: 30, borderColor: “black”, borderWidth: 5, label: { backgroundColor: “red”, content: “Test Label”, enabled: true }, onClick: function(e) { // The annotation is is bound to the
this
variable console.log(“Annotation”, e.type, this); } }] } }}/>I simply can not see the horizontal line.
I copied the code for annotations from: https://codepen.io/anon/pen/aKjevd which does basically what I need mine to do.