Having issues with D3 scale and data binding

58 views Asked by At

I've attached fiddle which has JSON, JS, CSS, HTML- https://jsfiddle.net/mihirchronicles/f9mjqwoa/. The goal is to use D3 to show the range of low, medium and high on Bitcoin circulation(volume) for given dates. Also, display the total circulation and display the circulation for each year. I am having issues binding data and scaling on D3. Any help would be great!

var width = 940, //width
      height = 600, //height
      tooltip = new CustomTooltip("bitcurve_tooltip", 240), //tooltip
      layout_gravity = -0.01, //gravity
      damper = 0.1, //moving around nodes
      nodes = [], //empty nodes
      //these will be set in create_nodes and create_vis
      vis = null, 
      force = null, 
      circles = null, 
      radius_scale = null;
      range,
      lowRange,
      aveRange,
      highRange;
 //defining the center based on width and height
  var center = {x: width / 2, y: height / 2}; 

 //defining the area for all the years when split
  var year_centers = {
      "2011": {x: width / 3, y: height / 2},
      "2012": {x: width / 2, y: height / 2},
      "2013": {x: 2 * width / 3, y: height / 2}
    };
0

There are 0 answers