             @["_#{accessor}"] = newValue
             return @
 
-  return new FlameGraph('#d3-flame-graph').width(1200).height(600)
+  return new FlameGraph()
 
 d3.json "data/profile-large.json", (err, data) ->
   window.flameGraph = d3.flameGraph()
-  flameGraph.data(convert(data.profile))
-    .render()
-    .interactivity()
+  flameGraph
+    .containerId('#d3-flame-graph')
+    .width(1200).height(600).cellHeight(10)
+    .data(convert(data.profile))
+    .colorScheme(["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026"])
+    .render()
          .append('rect')
            .attr('class', 'node')
            .attr 'width', (d) => @x(d.dx)
            .attr('height', (d) => @cellHeight - 2)
            .attr('x', (d) => @x(d.x))
            .attr('y', (d) => @y(d.y))
            # .attr('rx', constants.RX)
            # .attr('ry', constants.RY)
            .attr('stroke', (d) -> randomizeColor(constants.FLAME_RGB))
            .attr('fill', (d) -> if d.color then d.color else randomizeColor(constants.FLAME_RGB))
            .attr('fill-opacity', '0.8')

      @container
        .selectAll('.label')
        .data(@data().filter((d) => d.name and @x(d.dx) > constants.MIN_LABEL_WIDTH))
        .enter()
          .append('text')
            .attr('class', 'label')
            .attr('text-anchor', 'middle')
            .attr('dy', constants.EM_OF_LABEL_HEIGHT)
            .attr('x', (d) => @x(d.x) + @x(d.dx) / 2)
            .attr('y', (d) => @y(d.y) + @cellHeight / 2)
            .text((d) => @getLabelText(d.name, d.dx))
          # .on("mouseover", (d) -> @onMouseover(d))
          # .on("mousemove", (d) -> @onMousemove())
          # .on("mouseout", (d) -> @onMouseout())
          # .on("click", (d) -> if (!d3.event.defaultPrevented) then @onSetRootCallback(d.location))

      console.timeEnd('rendering')
      console.log("Rendered #{@container.selectAll('.node')[0].length} elements")
      return @

    interactivity: () ->
      console.time('interactivity')
      clickHandler = (d) =>
          console.log(d.y, @y(d.y))
          @data(d).render().interactivity()

      @container
        .selectAll('.node')

      @container
        .selectAll('.label')
        .on 'click', clickHandler
      console.timeEnd('interactivity')
      @

