 
       @link_list = _.map D3.sankey.charts[k].data.links, (l) =>
         new D3.sankey.Link(_.extend l, view: this)
+
+      @value_formatter = (x) -> Metric.autoscale_value x, 'PJ', 2
+
       @initialize_defaults()
 
     # this method is called when we first render the chart. It is called if we

      # update the node label
      @nodes.data(@node_list, (d) -> d.get('id'))
        .attr("data-tooltip", (d) =>
          h = "<strong>
            #{d.label()}: #{Metric.autoscale_value d.value(), 'PJ', 2}
          </strong><br/>"
          for l in d.right_links
            h += "-&gt; #{l.right.label()}: #{Metric.autoscale_value l.value(), 'PJ', 2}<br/>"
          for l in d.left_links
            h += "#{l.left.label()} &lt;-: #{Metric.autoscale_value l.value(), 'PJ', 2}<br/>"
          h
          )

      # move the rectangles
      @nodes.selectAll("rect")

    setup_tooltips: ->
        $("g.node").qtip
          content:
            title: -> $(this).attr('data-tooltip-title')
            text: -> $(this).attr('data-tooltip')
          position:
            target: 'mouse'
