-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using plugins #29
Comments
+1 |
I'd be interested in this as well! |
I've sort of got this working. What I did was to create a utility file in my react folder "ChartistUtils" (the name doesn't really matter though). Then in that utility file I imported the main Chartist package, which I had installed in my project via npm. I then included a function for the plugin, and exported the function. In my react component where I have my chart, I imported the new utility file and included it as a plugin. I've attached two files to show my code. I just tried this with the sample line point function... This is a portion of my component:
and this is the utility file:
|
This is not an issue with The |
Thanks to your work hilary-L, i could implement chartist-zoom on a ES6 React project, here is the code for anyone that need it: You need an XY data array like in the zoom example in http://gionkunz.github.io/chartist-js/plugins.html or it won't find axis.bounds.max of AxisX. |
how it's not implemented yet? |
Any update here? |
Sorry I don't have time to look at a complete implementation yet. Please refer to the comment above and free feel to create a pr. |
in the case of chartist-plugin-axistitle, it exports itself in several ways based on environment it's used in. If used in an environment supporting module.exports (such as create react app) you can just load it like any js module import chartistPluginAxisTitle from 'chartist-plugin-axistitle' |
I was wondering if theres a more elegant way to use plugins by now? |
thanks, your options setting helped me. |
Is it possible to use plugins with this? So far I have not been able to see how, although I am far from a Javascript expert. In particular, I would really like to be able to use the axis title plugin.
The text was updated successfully, but these errors were encountered: