cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hi community,

I would like to build a Custom Widget for SAP Analytics Cloud making use of D3js for fancy graphics. I've read this should work using webpack for example, however I am a little uncertain of how to apply it in this case.

Does anyone know an example that shows how to include an external JavaScript library in a Custom Widget Web Component?

Thanks a lot!

Johannes

0 Likes
View Entire Topic
Bob0001
Product and Topic Expert
Product and Topic Expert

Using webpack or another bundler is the recommended approach, as it avoid conflicts when having the same library in different versions in one context. Of course the library has to support this and is not defining any global variables. Webpack will create one file containg your custom widget implementation and your third party libraries. You can use any webpack setup. Good starting point is https://webpack.js.org/guides/getting-started/. There is nothing specific to custom widgets here. If you are also using Babel make sure not to package the babel polyfill with your code as it is provided by SAP Analytics Cloud already.