   graphHeight = 180
   # padding used underneath the bars to make space
   # for the names of the countries
-  yPadding = 12
-  xPadding = 12
+  yPadding = 20
+  xPadding = 20
   # placeholder for the data
   data = []
+  
+  #place holder for x and y maxes
+  xMax = 0
+  yMax = 0
 
   # 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

    selection.each (rawData) ->
      # store our data and set the scale domains
      data = rawData
      setScales()
      #createLegend()

      # bind data to svg elements so there will be a svg for

  # expects 'data' to be accessible and set to our
  # data.
  # ---
  
  setXScale = (xScale, d) ->
    xMax = d3.max(d.values, (e) -> e.exp_ratio) #takes the max of exp_ratio in the values array
    console.log(xMax)
    xOffSet = 0.5
    xScale.domain([0,xMax + xOffSet])
    xMax
  
  setYScale = (yScale, d) ->
    yMax = d3.max(d.values, (e) -> e.ten_year_return)
    console.log(yMax)
    yOffset = 7
    yScale.domain([0,yMax + yOffset]) #change yMax + 500000 to yMax + 7
    yMax
    
  setScales = () ->
    # this scale is expanded past its max to provide some white space
    # on the top of the bars
    #yScale.domain([0,yMax + 500000]) #change yMax + 500000 to yMax + 5

    # names = data[0].values.map (d) -> d.name
    # xScale.domain(names)
