score:9
Accepted answer
the stack method expects your data to be equally length-ed. each key
must have the same dates
. for instance, if we only look at your first 3 keys (countries) and fixed the data to this:
key,value,date
afghanistan,1129,01/01/15
afghanistan,969,02/01/15
afghanistan,885,03/01/15
afghanistan,1119,04/01/15
afghanistan,1151,05/01/15
afghanistan,2051,06/01/15
afghanistan,2104,07/01/15
afghanistan,2270,08/01/15
afghanistan,2724,09/01/15
afghanistan,3770,10/01/15
albanien,1598,01/01/15
albanien,1735,02/01/15
albanien,2955,03/01/15
albanien,4743,04/01/15
albanien,4864,05/01/15
albanien,5837,06/01/15
albanien,7547,07/01/15
albanien,8234,08/01/15
albanien,6624,09/01/15
albanien,4549,10/01/15
bosnien und herzegowina,0,01/01/15 //<-- this was missing
bosnien und herzegowina,370,02/01/15
bosnien und herzegowina,380,03/01/15
bosnien und herzegowina,472,04/01/15
bosnien und herzegowina,382,05/01/15
bosnien und herzegowina,0,06/01/15 //<-- this was missing
bosnien und herzegowina,0,07/01/15 //<-- this was missing
bosnien und herzegowina,0,08/01/15 //<-- this was missing
bosnien und herzegowina,0,09/01/15 //<-- this was missing
bosnien und herzegowina,0,10/01/15 //<-- this was missing
then the graph draws as expected.
Source: stackoverflow.com
Related Query
- Uncaught TypeError: Cannot read property 'linear' of undefined
- d3.svg.line() error: Uncaught TypeError: Cannot read property 'line' of undefined
- C3JS - Cannot read property 'category10' of undefined
- D3.js - Cannot read property 'axis' of undefined
- D3.js : Uncaught TypeError: Cannot read property 'document' of undefined
- Uncaught TypeError: Cannot read property 'arc' of undefined in AngularJS and D3
- Cannot read property 'force' of undefined (Simple D3 Network graph)
- NVD3 Line Chart Uncaught TypeError: Cannot read property 'x' of undefined
- D3 Zoom Cannot read property 'transform' of undefined
- Cannot read property 'drag' of undefined D3
- TypeError: Cannot read property 'childNodes' of undefined angular
- Cannot read property 'weight' of undefined in d3.force implementation
- topojson.js:187: Uncaught TypeError: Cannot read property 'type' of undefined
- Uncaught TypeError: Cannot read property 'axis' of undefined
- Uncaught TypeError: Cannot read property 'albersUsa' of undefined
- d3.js - Uncaught TypeError: Cannot read property 'data' of undefined
- TypeError: Cannot read property '1' of undefined D3.js
- Datamaps is giving me a Cannot read property 'albersUsa' of undefined
- Cannot read property 'getHours' of undefined
- NV.D3 Cannot read property 'length' of undefined
- topojson/d3.js: Uncaught (in promise) TypeError: Cannot read property 'type' of undefined
- d3 Cannot read property 'classed' of undefined
- Uncaught TypeError: Cannot read property 'type' of undefined with d3.js
- 'd3.nest()' cannot read property of undefined
- Trouble Shooting Cannot Read Property 'length' of Undefined
- d3.scale.log cannot read property log of undefined
- D3.js Cannot read property 'length' of undefined
- Cannot read property 'push' of undefined when refactoring code
- Displaying SVG elements with D3 and d3.slider: Uncaught TypeError: Cannot read property 'length' of undefined
- Uncaught TypeError: Cannot read property 'length' of undefined in d3.js
More Query from same tag
- How do I convert a JavaScript forEach loop/function to CoffeeScript
- D3.js and jQuery - multiple map points and click events
- d3js zoom eventhandlers not firing events properly
- How to filter children based on whether the parent is filtered in D3?
- Fit D3 map in SVG
- Tree structure-starting with only root node onload
- d3 units formatting SI with rounding (nvd3 charts)
- How do you prevent the interference of MULTIPLE SVG elements (text labels) on mouseover of a different SVG element?
- hovering on one class not working for classes defined before it
- d3.js transition() not working when browser is minimised
- Create multiple graphs from different files in d3.js
- dc.js add class to data points in multiple charts based on criteria from first chart
- Edit the innerRadius of D3 Sunburst visualization
- Append multiple 'text' elements in d3
- accessing and updating different objects of an array in d3
- Remove a svg element after transition in d3
- Sorting objects based on property value in D3
- How to load txt files into D3.JS
- cs.js - displaying only one line at the same time (in multi-line chart)?
- Adding axes eats up my data
- Is a horizontal scroll bar for graphs available on Bokeh?
- customizing d3.js brush as slider
- Build system for JS applications - worth the effort?
- How to initiate zoomability in a Sunburst with selection from dropdown
- Wrapping path elements in an anchor tag
- d3 data manipulation before plotting
- D3 function(d,i) callback skips first item
- Grouping a nested array
- D3.js onclick switching other line color
- Ploting box plot from statistical summary data