krispo / ng2-nvd3

Angular2 component for nvd3
http://krispo.github.io/ng2-nvd3/
MIT License
328 stars 104 forks source link

Bar chart sample not working with Angular4 #106

Open k-graefenhain opened 7 years ago

k-graefenhain commented 7 years ago

I tried to include your basic bar chart sample in my Angular4 app. I can build and start my app but nothing is displayed. I get the following error in the console: core.es5.js:1084 ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'ordinal' of undefined TypeError: Cannot read property 'ordinal' of undefined at Object.nv.models.discreteBar (nv.d3.js:3957) at Object.nv.models.discreteBarChart (nv.d3.js:4206) at NvD3Component.initChart (ng2-nvd3.component.js:26) at NvD3Component.ngOnChanges (ng2-nvd3.component.js:11)

I also tried downgrading d3 to version 3.4.4 - in that case I could't even build the app.

nofear87 commented 7 years ago

Hey, I use npm install d3@3.5.17 --save and it works like a charme. Please try it.

saurabh-praeeo commented 5 years ago

its working fine but links are not able to generate..