Open klvenky opened 6 years ago
I am also getting this. Following.
i am also getting the same issue in my project
@anupam96mondal I don't know if I am right or not. Looks like this library is not actively maintained. You can probably look and find the root cause or try using some other library. I have used recharts. It also uses d3 and has nice customizations. I will try to see if I can find the root cause. Other wise find an alternative
I'm getting the same issue using React 16.2 and the LineChart component => I'll try to find an alternative.
Seems this lib is using outdated react. The error is explained here: https://stackoverflow.com/questions/44573199/cannot-read-property-string-of-undefined-react-proptypes-layoutproptypes-j
Anyone comes up with a fork?
I have the same issue in my code, I had the same issue with react-sparklines so I tried this library. The issue as stated in this StackOverflow question is that the PropTypes is deprecated in the new release of React, However, I installed propt-types seperately but I dont know how to use it to solve this issue
@ashwinkjoseph I think for fixing the issue, the library needs to be updated with the usage of latest prop-types module instead of pulling it from react instead. So I am not sure if this could be solved as easily. Let me try to fork once and check if I can make it work. Fingers crossed though
I just did exactly what you described as the solution. I did import the latest prop-types library and removed its dependencies on prop types from react.
Thanks and Regards Joseph Ashwin Kottapurath ashwinkjoseph@gmail.com +91-9745511318
On Thu, Jun 7, 2018, 12:46 PM Leela Venkatesh K notifications@github.com wrote:
@ashwinkjoseph https://github.com/ashwinkjoseph I think for fixing the issue, the library needs to be updated with the usage of latest prop-types module instead of pulling it from react instead. So I am not sure if this could be solved as easily. Let me try to fork once and check if I can make it work. Fingers crossed though
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/react-d3/react-d3-basic/issues/56#issuecomment-395318176, or mute the thread https://github.com/notifications/unsubscribe-auth/AND4FhcNyJLwNcbCaKUo1xN0pmZGEbqTks5t6NM-gaJpZM4Q-hAP .
@klvenky Thank you for that suggestion! I will try and make this my first PR.
I am a bit new to react and I am experiencing this issue. Can you please explain in a bit more detail which files need to be updated to prop-types?
@ggsklias
npm install prop-types
var PropTypes = require('prop-types')
at the top of each file that has a reference to PropTypesIf you "recompile" your app, the error log should guide you to which files your app is using so you don't have to go through each file. But if you want to cover all your bases so you don't encounter this issue later on, I recommend checking each file.
the error says
Cannot read property 'string' of undefined.
However I am passing a string as id to the chart component already. Same is the case for PieChart as wellLooks like the entire library has a bug. Please help. I'm struck for almost 2 days