d3_in_action_2 icon indicating copy to clipboard operation
d3_in_action_2 copied to clipboard

Germany is not getting the blue color (chapter 3 page 3_24.html)

Open erbrito opened this issue 7 years ago • 1 comments

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(…)

erbrito avatar Dec 05 '16 02:12 erbrito

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

wolfgangvonludwigsburg avatar Dec 11 '16 11:12 wolfgangvonludwigsburg