         else
             markings = []
 
-        @plot_options =
-            colors: colors
-            series:
-                bars:
-                    show: true
-                    fill: 1
-                    barWidth: 16 * 24 * 60 * 60 * 1000     # milliseconds
-                    align: "center"
+        @plot_global_options['yaxis']['max'] = max_score
+        @plot_global_options['grid']['markings'] = markings
+
+        @plot_series.push
+            data: act_histogram
+            color: "#00c0c0"
+            bars:
+                show: true
+                fill: 1
+                barWidth: 16 * 24 * 60 * 60 * 1000     # milliseconds
+                align: "center"
+
+        @draw_plot()
+
+        return @
+
+    get_plot_global_options: (start_time, end_time) ->
+        return {
             xaxis:
                 mode: "time"
                 tickLength: 5

        time = new Date(end_date)
        year = time.getFullYear()
        month = time.getMonth()
        @start_time = new Date(year - 2, month + 1, 1)
        start_time_str = @start_time.getFullYear() + "-" +  \
                          (@start_time.getMonth() + 1) + "-" + \
                          @start_time.getDate()

        time =  new Date(new Date(year, month + 1, 1).getTime() - 1)
        year = time.getFullYear()
        month = time.getMonth()
        day = time.getDate()
        @end_time = new Date(year, month, day)
        end_time_str = @end_time.getFullYear() + "-" + \
                       (@end_time.getMonth() + 1) + "-" + \
                       @end_time.getDate()

        resolution = 'month'
        if activity_daily_avg

            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
