krispo / angular-nvd3

AngularJS directive for NVD3 reusable charting library (based on D3). Easily customize your charts via JSON API.
http://krispo.github.io/angular-nvd3
MIT License
1.29k stars 377 forks source link

graphs display in ios emulator but not in actual ios device (Ionic app) #317

Open griff4692 opened 8 years ago

griff4692 commented 8 years ago

In the emulator I can see the various stackedAreaCharts using angular-nvd3 directives to draw. I get the following error only in the emulator, but not when I run the app using ionic serve on localhost.

Error: undefined is not an object (evaluating 'options.chart.type') updateWithOptions@https://cdnjs.cloudflare.com/ajax/libs/angular-nvd3/1.0.5/angular-nvd3.min.js:1:3415 refresh@https://cdnjs.cloudflare.com/ajax/libs/angular-nvd3/1.0.5/angular-nvd3.min.js:1:2966 https://cdnjs.cloudflare.com/ajax/libs/angular-nvd3/1.0.5/angular-nvd3.min.js:1:6809 https://cdnjs.cloudflare.com/ajax/libs/angular-nvd3/1.0.5/angular-nvd3.min.js:1:7896 $digest@file:///Users/griffinadams/Library/Developer/CoreSimulator/Devices/04E08EF7-3015-4006-BF43-3CB80F01650D/data/Containers/Bundle/Application/99911A93-AADE-4A8F-A27E-6FF48A023009/DigitalAgent-Sidemenu.app/www/lib/ionic/js/ionic.bundle.js:24515:31 $apply@file:///Users/griffinadams/Library/Developer/CoreSimulator/Devices/04E08EF7-3015-4006-BF43-3CB80F01650D/data/Containers/Bundle/Application/99911A93-AADE-4A8F-A27E-6FF48A023009/DigitalAgent-Sidemenu.app/www/lib/ionic/js/ionic.bundle.js:24783:31 done@file:///Users/griffinadams/Library/Developer/CoreSimulator/Devices/04E08EF7-3015-4006-BF43-3CB80F01650D/data/Containers/Bundle/Application/99911A93-AADE-4A8F-A27E-6FF48A023009/DigitalAgent-Sidemenu.app/www/lib/ionic/js/ionic.bundle.js:19196:53 completeRequest@file:///Users/griffinadams/Library/Developer/CoreSimulator/Devices/04E08EF7-3015-4006-BF43-3CB80F01650D/data/Containers/Bundle/Application/99911A93-AADE-4A8F-A27E-6FF48A023009/DigitalAgent-Sidemenu.app/www/lib/ionic/js/ionic.bundle.js:19368:15 requestLoaded@file:///Users/griffinadams/Library/Developer/CoreSimulator/Devices/04E08EF7-3015-4006-BF43-3CB80F01650D/data/Containers/Bundle/Application/99911A93-AADE-4A8F-A27E-6FF48A023009/DigitalAgent-Sidemenu.app/www/lib/ionic/js/ionic.bundle.js:19309:24

Once again, the graphs draw fine in the emulator and localhost, but do not display and I am pretty sure are causing the code to stop running in the iPad or any other ios device.

ehartford commented 8 years ago

I'd put this question on stack overflow. Try to use the safari devtools web inspector to look at the network requests and see if any have failed, and look for any other console errors. Could have to do with the fact that you're loading it from a file system rather than a web server.