       xstat  = el.attr 'data-x'
       ystat  = el.attr 'data-y'
       team   = el.attr 'data-team'
-      player = el.attr 'data-player'
 
       if not ystat
         ystat = d3.shuffle(__metrics)[0]


      url = "#{document.location.origin}/interactive?y=#{ystat.k}&x=#{xstat.k}"
      url += "&team=#{team.toLowerCase()}" if team
      url += "&player=#{player}" if player

      d3.select('.js-url').attr 'value', url

      {xstat, ystat, team, player}

    d3.selectAll('.js-stats .js-stat').on 'change', (e) ->
      select = d3.select this

        pid  = data.player_id

        el.attr 'data-team', team
        redraw()

      yrow.on 'click', highlight
