$(document).ready(function() {
    var options = {
        legend: {
            show: true,
            position: 'ne'
        },
        series: {
            shadowSize: 0
        },
        xaxis: { mode: "time" },
        yaxis: { min: 0 }
    };
    var plot = $.plot($("#chart"), [], options);

    var _data = [];

    var events = new EventSource("/updates" + document.location.search);
    events.onmessage = function(e) {
        var update = JSON.parse(e.data);

        for (var i = 0; i < update.m.length; ++i) {
            if (_data.length <= i) {
                var series = {
                    label: update.m[i].n,
                    data: [],
                    lines: { show: true, fill: false }
                };
                _data.push(series);
            }

            point = [update.t, update.m[i].v];
            _data[i].data.push(point);
        }

        plot.setData(_data);
        plot.setupGrid();
        plot.draw();
    };
});


@@ -171,132 +171,931 @@
 e: 0
-%0A        %7D,%0A        xaxis: %7B mode: %22time%22 %7D,%0A        yaxis: %7B min: 0 %7D%0A    %7D;%0A    var plot = $.plot($(%22#chart%22), %5B%5D, options
+,%0A            lines: %7B show: true, fill: false %7D,%0A            points: %7B show: true %7D,%0A        %7D,%0A        grid: %7B%0A            hoverable: true%0A        %7D,%0A        xaxis: %7B mode: %22time%22 %7D,%0A        yaxis: %7B min: 0 %7D%0A    %7D;%0A    var plot = $.plot($(%22#chart%22), %5B%5D, options);%0A%0A    $(%22%3Cdiv id='tooltip'%3E%3C/div%3E%22).css(%7B%0A        position: %22absolute%22,%0A        display: %22none%22,%0A        border: %221px solid #fdd%22,%0A        padding: %222px%22,%0A        %22background-color%22: %22#fee%22,%0A        opacity: 0.80%0A    %7D).appendTo(%22body%22);%0A%0A    $(%22#chart%22).bind(%22plothover%22, function(event, pos, item) %7B%0A        if (item) %7B%0A            var x = new Date(item.datapoint%5B0%5D),%0A            y = item.datapoint%5B1%5D.toFixed(2);%0A%0A            $(%22#tooltip%22).html(item.series.label + %22 at %22 + x.toUTCString() + %22 = %22 + y)%0A            .css(%7Btop: item.pageY+5, left: item.pageX+5%7D)%0A            .fadeIn(200);%0A        %7D else %7B%0A            $(%22#tooltip%22).hide();%0A        %7D%0A    %7D
 );%0A%0A
@@ -1461,64 +1461,8 @@
 : %5B%5D
-,%0A                    lines: %7B show: true, fill: false %7D
 %0A   

Add tooltip on mouseover.