Not able to build with require js
could you please tell me, how to use this library with require js.
I am getting the error " Cannot read property 'scale' of undefined" in "react-d3-components.js". i am not using webpack build.
Could you post some sample of your code? The data you pass to the graph that makes it fail would be helpful :)
Directory structure -Css -Fonts -Images -Js
(1) In js/index.html Here I have included d3.js using
(2 )In JS folder I have saved react-d3-components library (3) In js/sample.js I have require react-d3-components using Var xyz = require (“react-d3-components”); (4) Now when running the app I am getting error Uncaught TypeError: Cannot read property 'scale' of undefined. so the issue is app is not loading in the browser.
This error mostly happens if the data you pass to the graph is bad or cannot be handled by the default scales. Since the code itself seems to be running I don't think it's a problem with requirejs. I could be wrong but.. could you provide a sample of the data you pass to the graph?
when building the code i got the error "Cannot read property 'scale' of undefined". so issue is in the loading "react-d3-components" library. it is not loading in the browser. so i think it fails on the first step before going to pass the data to the charts and all that..
Thanks for the sample. I will learn a little about requirejs when I find some free minutes. Haven't used it yet.
okay , please go through it, when you get some free time.