{"action":"closed","issue":{"url":"https://api.github.com/repos/esbullington/react-d3/issues/260","labels_url":"https://api.github.com/repos/esbullington/react-d3/issues/260/labels{/name}","comments_url":"https://api.github.com/repos/esbullington/react-d3/issues/260/comments","events_url":"https://api.github.com/repos/esbullington/react-d3/issues/260/events","html_url":"https://github.com/esbullington/react-d3/issues/260","id":106151080,"number":260,"title":"Basic Bar and PieChart Examples Error >> Uncaught TypeError: Cannot read property 'map' of undefined","user":{"login":"AlexHandy1","id":5671036,"avatar_url":"https://avatars.githubusercontent.com/u/5671036?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexHandy1","html_url":"https://github.com/AlexHandy1","followers_url":"https://api.github.com/users/AlexHandy1/followers","following_url":"https://api.github.com/users/AlexHandy1/following{/other_user}","gists_url":"https://api.github.com/users/AlexHandy1/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexHandy1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexHandy1/subscriptions","organizations_url":"https://api.github.com/users/AlexHandy1/orgs","repos_url":"https://api.github.com/users/AlexHandy1/repos","events_url":"https://api.github.com/users/AlexHandy1/events{/privacy}","received_events_url":"https://api.github.com/users/AlexHandy1/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-12T11:59:07Z","updated_at":"2015-09-14T13:58:17Z","closed_at":"2015-09-14T13:58:17Z","body":"Trying to implement your basic Bar and PieChart examples locally. \r\nNpm packages all installed correctly - loading up through a basic webpack and bundle.js set-up which had been working fine on previous programme. \r\nWhen add in below code to a simple component I get error thrown from underlying react-d3 code of \"Uncaught TypeError: Cannot read property 'map' of undefined\" (see specific code snippet that throws error at end)\r\nIs the issue how data is being input? Or is it a problem with how bundle.js is compiling the jsx?\r\n\r\n````js\r\nvar rd3 = require('react-d3');\r\nvar PieChart = rd3.PieChart;\r\n\r\nvar pieData = [\r\n  {label: 'Margarita', value: 20.0},\r\n  {label: 'John', value: 55.0},\r\n  {label: 'Tim', value: 25.0 }\r\n];\r\n\r\nvar Hello = React.createClass({\r\n    render: function() {\r\n        return <PieChart data={pieData}\r\n              width={400}\r\n              height={400}\r\n              radius={100}\r\n              innerRadius={20}\r\n              sectorBorderColor=\"white\"\r\n              title=\"Pie Chart\"/>\r\n  }\r\n});\r\n\r\n//simplified\r\nrender: function(){\r\n    return(\r\n          <Hello/>\r\n    )\r\n  }\r\n\r\n````\r\n\r\n````js\r\nd3.layout.stack = function() {\r\n\t    var values = d3_identity, order = d3_layout_stackOrderDefault, offset = d3_layout_stackOffsetZero, out = d3_layout_stackOut, x = d3_layout_stackX, y = d3_layout_stackY;\r\n\t    function stack(data, index) {\r\n\t      if (!(n = data.length)) return data;\r\n\t      var series = data.map(function(d, i) {\r\n\t        return values.call(stack, d, i);\r\n\t      });\r\n//error here\r\n\t      var points = series.map(function(d) {\r\n\t        return d.map(function(v, i) {\r\n\t          return [ x.call(stack, v, i), y.call(stack, v, i) ];\r\n\t        });\r\n\t      });\r\n````"}}