Lurker News

Comments (87) 23 threads

Earlier comments
boffinism3 replies#
Question: For codebases that are all about package managers Yarn, what's best practice for integrating something like this? Just push it into a 'vendor' folder?
paultannenbaum#
You would have to dive into how the library was implemented and see if it is compatible as a node module. There is an issue right here in the repo you can follow: https://github.com/frappe/charts/issues/6
TheAceOfHearts#
It depends on how the library is implemented, so you're expected to look at the source.

If you're using something like Webpack and the library just places everything on the global scope, you can configure exports-loader [0]. That way you can reference the module as if it were written with CJS or ESM, without having to change the source.
If it's not published on npm, you can reference the git repo along with the specific release tag you want to use. My suggestion would be to fork the repo and point to your fork in package.json, so things continue to work if the original repo ever gets taken down.
[0] https://webpack.js.org/loaders/exports-loader/

bobrown101#
Yeah this is really impressive. Right now I can't think of a use case for it but if I need charts like this in the future I will most likely use this be library.
m1#
Any support for realtime/updating graphs on the fly?
techaddict0091 reply#
This charts looks awesome. Will surely use in my next project. Can I know how I can add two data points. I mean how to show two graph lines in single chart?
matt4077#
The second example seems to do just that, if you switch to "line chart".

Load more comments