   display = (data) ->
     plotData("#vis", data, plot)
 
-  d3.json("data/co2_kt_data.json", display)
-	#d3.json("data/funds.json", display)
+  # d3.json("data/co2_kt_data.json", display)
+  d3.json("data/funds.json", display)
 	
-

    pos = $(el).position()
    pos

  createLegend = () ->
    legend = d3.select("#legend")
      .append("svg")
      .attr("width", 100)
      .attr("height", 300)

    keys = legend.selectAll("g")
      .data(data[0].values)
      .enter().append("g")
      .attr("transform", (d,i) -> "translate(#{0},#{40 * (i + 1)})")

    keys.append("rect")
      .attr("width", 30)
      .attr("height", 30)
      .attr("fill", (d) -> colorScale(d.name))

    keys.append("text")
      .text((d) -> d.name)
      .attr("text-anchor", "left")
      .attr("dx", "2.2em")
      .attr("dy", "1.2em")

  return chart



  # using an ordinal scale for X as our
  # data is categorical (the names of countries)
  # xScale = d3.scale.ordinal()
  #   .rangeRoundBands([0, graphWidth], 0.1)

  xScale = d3.scale.linear().range([0, graphWidth])

  # names will also be used to color the bars
  #colorScale = d3.scale.ordinal()
  #  .range(["#ff7f0e", "#1f77b4", "#2ca02c", "#d62728", "#8c564b", "#9467bd"])

  # yPadding is removed to make room for country names
  yScale = d3.scale.linear().range([0, graphHeight - yPadding])

  # This is the amount by which we will enlarge the small chart 
  # when displaying it in detail display
