javascript – Trying to load some data in-ThrowExceptions

Exception or error:

I am trying to understand how to run some code. I would like to have the circles plot with my data from the JSON file. I am not too sure how to go about this. I think I am messing up with not connecting the files or maybe my JSON file isn’t set up correctly….my end goal is to make a connected scatterplot so, for now, I am just focusing on the circles.

<script src=""></script>

<svg id="s" xmlns="" />
<script type="text/javascript">
  function makeSVG(tag, attrs) {
    var el = document.createElementNS('', tag);
    for (var k in attrs)
      el.setAttribute(k, attrs[k]);
    return el;

  var data;
  $.getJSON("", function(data) {

  var circle = makeSVG('circle', {
    cx: 100,
    cy: 50,
    r: 40,
    stroke: 'black',
    'stroke-width': 2,
    fill: 'red'
  var data

<svg width="1000" height="1000">
        <line x1="200" y1="100" x2="200" y2="600" height="1000" width="1000" style="stroke:black;stroke-width:2"  /> 
        <line x1="200" y1="600" x2="900" y2="600" height="1000" width="1000" style="stroke:black;stroke-width:2" /> <!-- bottom line -->
How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *