-
Is it possible to use C3 and billboard.js (with pkg as it includes d3) together? Reason is we have some old charts which are built with C3 and D3 and we are moving towards billboard.js how ever for some duration we will have to include both of them, meaning C3, D3 (old version compatible with C3) with exposing them to global scope and then new packaged billboard.js libraries. With the older D3 in global scope will it cause any problem for billboard.js? Does billboard.js support providing alias D3? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hi @5r1m, basically c3 & billboar.js uses different global namespace, so in that sense I guess will not have issue. Is not difficult to test on this, so try. |
Beta Was this translation helpful? Give feedback.
-
Thanks @netil . I have already tried this and it works. I also asked this for few other reasons:
All this made me to be ask this question so that it doesnt create problem in future if we take this path. Thank you once again for this library and your support. |
Beta Was this translation helpful? Give feedback.
-
The "packaged" means, the distribution comes with the d3.js. We mentioned to be not as an 'official', because in general billboard.js will be consumed as module. Assuming each project has its own build configurations, where in most cases project owners want to control how to bundle it, is not adequate provide dependent module(d3.js) bundled as part of billboard.js package. So, based on that criteria, "packaged" distribution is only to facilitate those don't have own bundling necessity or being consumed as traditional script loading. Even described as "unofficial", the packaged build will be provided for future releases.
if you load the libraries(not only for billboard.js) as UMD, most libraries will expose their namespace as global, because is the only way to provide an access point. In case of billboard.js, will expose "window.bb" only as global namespace.
If you opt to use "packaged" build, don't have to. But if you're using the library importing as module(ESM/CJS), you need to handle d3.js transpiling for legacy browsers. |
Beta Was this translation helpful? Give feedback.
The "packaged" means, the distribution comes with the d3.js. We mentioned to be not as an 'official', because in general billboard.js will be consumed as module. Assuming each project has its own build configurations, where in most cases project owners want to control how to bundle it, is not adequate provide dependent module(d3.js) bundled as part of billboard.js package.
So, based on that criteria, "packaged" distribution is only to facilitate those don't have own bundling necessity or being consumed as traditional script loading.
Even described as "unofficial", the packaged build will be provided for future releases.
i…