                     else
                         format_str = "MMM"
                     return moment(d).format(format_str)
-                min: @start_time.getTime() - 20 * 24 * 60 * 60 * 1000
-                max: @end_time.getTime()
+                min: start_time.getTime() - 20 * 24 * 60 * 60 * 1000
+                max: end_time.getTime()
 
             yaxis:
                 show: false
-                max: max_score
 
             grid:
-                markings: markings
                 borderWidth:
                     top: 0
                     bottom: 1
                     left: 0
                     right: 0
-
-        @draw_plot()
-
-        $(window).resize =>
-            @draw_plot()
-    
-        return @
+        }
 
     add_all_items: (collection) =>
         @scores = collection

            data: params

    draw_plot: ->
        $.plot $(@el), [ @act_histogram ], @plot_options

    render: ->
        score_list = @scores.models

        if score_list.length == 0
            return @

        @act_histogram = []
        if @avg_bin_score
            max_score = @avg_bin_score + 20
        else


            time = new Date(time).getTime()
            column = [ time, score ]
            act_histogram.push column

            max_score = Math.max max_score, score

            data_idx += 1

        return [act_histogram, max_score]

    render: ->
        [act_histogram, max_score] = @get_histogram(@scores.models)

        if act_histogram.length == 0
            return @

        if @avg_bin_score
            markings = [
                yaxis:
