   values : => _.flatten @value_pairs()
 
   values_present: => _.map @non_target_series(), (s) -> s.safe_present_value()
-  values_future: =>  _.map @non_target_series(), (s) -> s.safe_future_value()
-  values_targets: => _.map @target_series(), (s) -> s.safe_future_value()
+  values_future:  => _.map @non_target_series(), (s) -> s.safe_future_value()
+  values_targets: => _.map @target_series(),     (s) -> s.safe_future_value()
 
   # @return [[Float,Float]] Array of present/future values [Float,Float]
-  value_pairs :->
+  value_pairs: ->
     @series.map (s) -> [s.safe_present_value(), s.safe_future_value()]
 
-  non_target_series : -> @series.reject (s) -> s.get('is_target_line')
+  non_target_series: -> @series.reject (s) -> s.get('is_target_line')
 
-  target_series : -> @series.select (s) -> s.get('is_target_line')
+  target_series: -> @series.select (s) -> s.get('is_target_line')
 
   # This is used to show a chart as a table
   # See base_chart_view#render_as_table
   formatted_series_hash : ->
     # the @non_target_series() array is wrapped in underscore to fix an IE8 bug
-    items = _(@non_target_series()).map (serie) =>
-      label = serie.get 'label'
-      label = "#{label} - #{serie.get('group')}" if @get('type') == 'mekko'
+    items = _(@non_target_series()).map (s) =>
+      type = s.get 'type'
+      label = s.get 'label'
+      label = "#{label} - #{s.get('group')}" if type == 'mekko'
+      unit = @get 'unit'
       out =
         label: label
-        present_value: Metric.autoscale_value(serie.safe_present_value(), @get('unit'), 2)
-        future_value:  Metric.autoscale_value(serie.safe_future_value(),  @get('unit'), 2)
+        present_value: Metric.autoscale_value(s.safe_present_value(), unit, 2)
+        future_value:  Metric.autoscale_value(s.safe_future_value(),  unit, 2)
     # some charts draw series bottom to top. Let's flip the array
-    return items.reverse() if @get('type') in ['vertical_stacked_bar', 'bezier']
+    return items.reverse() if type in ['vertical_stacked_bar', 'bezier']
     items
 
   # raw array of the associated gqueries. Delegates to the collection object


  render : =>
    return false unless @supported_by_current_browser()
    type = @get('type')
    d3_support = Browser.hasD3Support() && !window.disable_d3
    view_class = switch type
      when 'bezier'
        if d3_support
          D3.bezier.View
        else
          BezierChartView
      when 'horizontal_stacked_bar' then HorizontalStackedBarChartView
      when 'mekko'
        if d3_support
          D3.mekko.View
        else
          MekkoChartView
      when 'waterfall'              then WaterfallChartView
      when 'vertical_stacked_bar'
        if d3_support
          D3.stacked_bar.View
        else
          VerticalStackedBarChartView
      when 'grouped_vertical_bar'   then GroupedVerticalBarChartView
      when 'policy_bar'             then PolicyBarChartView
      when 'line'                   then LineChartView

  # D3 charts have their own class. Let's make an instance of the right one
  # D3 is a pseudo-namespace. See d3_chart_view.coffee
  d3_view_factory: =>
    key = @get 'key'
    if D3[key] && D3[key].View
      D3[key].View
    else
