     return @minMaxHours
 
 
+  updateMinMaxHours : ->
+
+    @minMaxHours = {}
+    @getMinMaxHours()
+
+
   updateSelectedTeam : ->
 
     @team = @ui.team.find("select")[0].value
+    @updateMinMaxHours()
+    @renderRangeSlider()
 
 
   onRender : ->

        color = @colorJet(128 - (workingHours - minMaxHours.min) * (128 / minMaxHours.max - minMaxHours.min) + 128)

        @quoted(userName) + " [id="+ @quoted(user.id) + ", shape=box, fillcolor=" + @quoted(color) + "]"
    ).join(";")

    svgTaskTypes = ""
    svgProjects = ""


  fetchData : (start, end) ->

    @fetchPromise = @model.fetch(
      data:
        start: start
        end: end
    ).done( => @updateMinMaxHours() )


  getMinMaxHours : ->

    # This function calculates the min/max working hours of the users of the selected team
    if _.isEmpty(@minMaxHours)
      selectedUsers = _.filter(@model.get("userInfos"), (userInfo) => @doDrawUser(userInfo.user))
      workingTimes = _.pluck(selectedUsers, "workingTime")

      if _.isEmpty(workingTimes) then workingTimes = [0]
      minTime = Math.min(workingTimes...)
      maxTime = Math.max(workingTimes...)

      # Convert ms to h
      @minMaxHours =
