1

I have the same problem as with this user: Angular nvD3 Error: Invalid isolate scope definition for directive nvd3

The answer there said "use the latest angularjs" beyond Angular 1.1.4....but I am using the latest AngularJS!! AngularJS v1.6.7

What could I be doing wrong?

georgeawg
  • 48,608
  • 13
  • 72
  • 95
  • @georgeawg, it is almost the same code in the other thread - I have tried her code and got the same error; so the problem is environment related. –  Dec 19 '17 at 23:21

1 Answers1

0

Works with this setup

<link rel="stylesheet" href="//unpkg.com/nvd3/build/nv.d3.css"/>
<script src="//unpkg.com/angular/angular.js"></script>
<script src="//unpkg.com/d3@3/d3.js" charset="utf-8"></script>
<script src="//unpkg.com/nvd3/build/nv.d3.js"></script>
<script src="//unpkg.com/angular-nvd3/dist/angular-nvd3.js"></script>

DEMO on PLNKR.

See angular-nvd3 Issue #539 - d3 version 4.x is not supported

georgeawg
  • 48,608
  • 13
  • 72
  • 95
  • thanks, this worked despite the errors: angular.js:34191 Uncaught TypeError: window.angular.$$csp is not a function at angular.js:34191 angular.min.js:63 TypeError: Cannot read property 'split' of undefined at Object.fn (app.js:182) at Object.$digest (angular.min.js:87) at Object.$apply (angular.min.js:89) at angular.min.js:16 at Object.d [as invoke] (angular.min.js:28) at c (angular.min.js:16) at tb (angular.min.js:16) at lc (angular.min.js:16) at HTMLDocument. (angular.min.js:163) at l (jquery.min.js:4) –  Dec 20 '17 at 10:47
  • @cupcake Your error may be due to the fact you added an obsolete jQuery to the mix. It works with jQuery v3.2.1. – georgeawg Dec 20 '17 at 11:15