Ionic app not including d3.js natively

I have an ionic app with some charts using the d3 js library. This works fine on a browser and ionic lab view, however this does not work on the ios emulator or a mobile device I can only test on an ios device atm. d3 is included at the very top of the index.html file.

I have tried using d3 via a CDN and as a bower dependency, works in browser not on native iOS device.

Fells like I am missing something, am I ?

i dont have experience with d3, but can you check errors with safari debugger?

can you explain how to do that, like I mentioned the app includes d3 properly when rub in a browser safari and chrome. The problem is on the native device. I cannot see a ‘safari debugger’ option in the emulator menu, sorry I use chrome and really new to ios development…


First enable develop mode.
Open Safari > Preferences > Advanced.
Click: Show Develop menu in menu bar

Start your app. Go to safari and choose Develop and choose your app. (sometimes it takes a while if the app is available in safari).

Then you check if you have errors and you can check if d3 is available in the window scope.

Thanks, d3 was not referenced properly. Thanks for your help :slight_smile:

How was your proper way to reference the d3 dependecy?