student student - 10 months ago 106
JSON Question

Bubble Menu using D3.js not rendering in jsfiddle

We've got a Bubble Menu using D3.js which is not rendering in this fiddle

The function

loads from which doesn't seems to be loading properly:

XMLHttpRequest cannot load No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '' is therefore not allowed access.

is not the main issue
, we're comfortable with

var data = {JSON data goes here}

which shall be passed to

Also, there is one more issue:

Uncaught TypeError: Cannot read property 'children' of undefined

The code is entirely copy pasted, but it's working on the main site but not on fiddle

Answer Source
  1. Rename data JSON variable to root.
  2. Remove the d3.json call