     selection.each (rawData) ->
       # store our data and set the scale domains
       data = rawData
-      setScales()
+      #setScales()
       #createLegend()
 
       # bind data to svg elements so there will be a svg for

  graphHeight = 180
  # padding used underneath the bars to make space
  # for the names of the countries
  yPadding = 12
  xPadding = 12
  # placeholder for the data
  data = []

  # 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 - xPadding])

  # 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

      .attr("width", graphWidth)
      .attr("height", graphHeight)
      .attr("class", "background")
        
    paddingFactor = 2
              
    #set different scale for each graph with padding factors for margins
    xScale = d3.scale.linear().range([0, graphWidth - xPadding*paddingFactor ])
    yScale = d3.scale.linear().range([graphHeight - yPadding*paddingFactor, 0])
    
    xMax = 0
    yMax = 0
    
    xMax = setXScale(xScale, d)
    yMax = setYScale(yScale, d)

    # create the dots for the scatter plot
    graph = base.append("g")
    graph.selectAll("circle")
      .data((d) -> d.values) #d now contains exp_ratio, ten_year_return, index
      .enter().append("circle") # the code below will execute for each attr on circle
      .attr("cx", (d) -> xScale(d.exp_ratio) + xPadding)
      .attr("cy", (d) -> yScale(d.ten_year_return) + yPadding)
      .attr("r", 2)
      .attr("fill", "orange")
      .attr("stroke", "gray")
