d3_in_action_2
d3_in_action_2 copied to clipboard
Germany is not getting the blue color (chapter 3 page 3_24.html)
In Chrome or in Opera browser, I'm getting an error with the 1st item, to get the color for the region.
The console is showing the following error.
3_24.html:109 Uncaught TypeError: Cannot read property 'region' of undefined(…)
Germany is not getting the blue color (chapter 3 page 3_24.html)
This issue sounds like a "political correcting" issue ... in concern to an upcoming "Trump-like" german party, that's associated with the color 'blue' ...
- so Germany MUST stuck to 'black' (= Merkel's Party) !! (... laughing ;-) )
But let's come back to reality ;-))
The error comes from: 3_24_orig.html:105 Uncaught TypeError: Cannot read property 'region' of undefined(…)
that's origined by a non fitting selection (in line 89) ... Change
- d3.selectAll("g").each(function() { to
- d3.selectAll("g.overallG").each(function() {
This example 3_24 is - at last to me as upcoming to d3 - somehow confusing, since the mixing/overlapping of d3 methods with SVG DOM methodology ...
Best wishes, Wolfgang