                     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

        else
            markings = []

        @plot_options =
            colors: colors
            series:
                bars:
                    show: true
                    fill: 1
                    barWidth: 16 * 24 * 60 * 60 * 1000     # milliseconds
                    align: "center"
            xaxis:
                mode: "time"
                tickLength: 5

            data: params

    draw_plot: ->
        if @plot_series.length == 0
            return

        $.plot $(@el), @plot_series, @plot_global_options

    get_histogram: (score_list) ->
        if score_list.length == 0
            return []

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