 
   # 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.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"])
+  #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])
+  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

  # Serves as example of simple additional interactions
  # in detail view
  # ---
  showAnnotation = (d) ->
    graph = d3.select("#detail_view .main")
    graph.selectAll(".subtitle").remove()

    graph.selectAll(".subtitle")
      .data([d]).enter()
      .append("text")
      .text("#{formatNumber(d.percent_world * 100)}% of Worldwide Emissions")
      .attr("class", "subtitle")
      .attr("fill", (d) -> colorScale(d.name))
      .attr("text-anchor", "middle")
      .attr("dy", "3.8em")
      .attr("x", (d) -> graphWidth / 2)
      .attr("font-size", 8)

  # ---
  # remove subtitle

    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

