         .attr('x', (d) -> d.scale(d.target_value()) - 1)
         .attr('fill', (d) -> if d.successful() then '#008040' else '#ff0000')
         .style('opacity', (d) -> if d.is_set() then 0.7 else 0.0)
-
-
-

      {key: 'offshore',               unit: 'km2'}
    ]

  # This represents a carrier within a sector
  Target: class extends Backbone.Model
    initialize: =>
      key = @get 'key'
      @namespace = D3.target_bar
      @success_query = new ChartSerie({gquery_key: "policy_goal_#{key}_reached"})
      @value_query   = new ChartSerie({gquery_key: "policy_goal_#{key}_value"})
      @target_query  = new ChartSerie({gquery_key: "policy_goal_#{key}_target_value"})
      @namespace.series.push @success_query, @value_query, @target_query
      @scale = d3.scale.linear()
      @axis = d3.svg.axis().tickSize(2, 0).ticks(4).orient('bottom')



    initialize: ->
      @key = @model.get 'key'
      @series = @model.series
      @targets = []
      for item in D3.target_bar.data[@key]
        item.view = this
        t = new D3.target_bar.Target(item)
        @targets.push t
      @initialize_defaults()

    margins:
      top: 25
      bottom: 10
      left: 20
      right: 18

    label_width: 100

    # margin between label and horizontal bars
    label_margin: 5

    draw: =>
      [@width, @height] = @available_size()
      for t in @targets
        t.scale.range([0, @width - @label_width - @label_margin])
      @svg = @create_svg_container @width, @height, @margins

      # Every target belongs to a group which is translated altogether
