Uncaught Error: Time mode requires the flot.time plugin.

489 views
Skip to first unread message

Jeremy Millar

unread,
May 1, 2015, 11:09:20 AM5/1/15
to flot-...@googlegroups.com
I just want to list all of the errors I have ran into with flot.
1. The tutorial uses numberformatter.js. This doesn't work. (Error: $.numberformat() is not a function).
2. Calling plot gave me issues for hours. Missing a # in the first parameter brings you to getting errors about width and height being 0. 
3. jquery.flot.time.js is not working. (Error: Time mode requires the flot.time plugin.)

This plugin runs into too many issues. 

Mike Hancock

unread,
May 5, 2015, 11:23:49 AM5/5/15
to flot-...@googlegroups.com
<script language="javascript" type="text/javascript" src="../assets/js/jquery.flot.min.js"></script>
<script language="javascript" type="text/javascript" src="../assets/js/jquery.flot.navigate.min.js"></script>
<script language="javascript" type="text/javascript" src="../assets/js/jquery.flot.time.min.js"></script>

$("#placeholder").bind("plothover", function (event, pos, item) {
    if (item)
    {
        var timestamp = item.datapoint[0].toFixed(2), y = item.datapoint[1].toFixed(2);
        var x = $.plot.formatDate($.plot.dateGenerator(timestamp, { timezone: "cst"}),"%m/%d %I:%M%p");

        $("#tooltip").html(item.series.label + " of " + y + "mbps at " + x)
                     .css({top: item.pageY+5, left: item.pageX+5})
                     .fadeIn(200);
    } else
    {
        $("#tooltip").hide();
    }
});

Similar issues.  Calling time 

calling $.plot.formatDate(timestamp,"%m/%d %I:%M%p"); returns --> TypeError: d.getHours is not a function

calling $.plote.formatDate($.plot.dateGenerator(timestamp,{timezone: "utc"}), "%m/%d %I:%M%p"); doesnt kick an error but returns "nan"
Reply all
Reply to author
Forward
0 new messages