Sunday, May 6, 2012

How to set line colors in Flot graph

// could not find simple example of setting line colors in Flot graph

var lcolors = ["#FFA500","#00BFFF","#DC143C","#3CB371"];

// get the data after graph is plotted, change line colors, then redraw

var plot = $.plot($("#placeholder"), data, getOptions());

series = plot.getData();

for (var i = 0; i < series.length; ++i) {
    if (i < lcolors.length) { 

        series[i].color = lcolors[i];   // override the default color


// options for time series graph with live refresh
function getOptions() {

    return {
        // drawing is faster without shadows
        series: {
            shadowSize: 0
        lines: {
            show: true
        grid: {
            hoverable: true,
            clickable: true
        legend: {
            show: false,
            backgroundOpacity: 0,
            position: 'nw'
        xaxis: {
            mode: 'time',
            max: new Date().getTime() - (new Date().getTimezoneOffset() * 60000),
            timeformat: "%H:%M%p"
        yaxis: {
            min: 0,
            tickFormatter: function suffixFormatter(val, axis) {
                return val.toFixed(axis.tickDecimals);

Saturday, April 28, 2012

HP Pavillion dv7t instructions for enabling function keys to work when pressed

as of April 28th, 2011 the instructions on HP website are backwards, I had to select DISABLED to get my Function keys to work normally on my hp dv7t laptop

Who the heck thought of disabling the function keys as the default? 

Friday, March 30, 2012

Gmail Basic HTML view looks restores the old Gmail interface

Just learned you can restore the old gmail interface by switching to basic HTML view.

Click this link to open Gmail in basic view  or just add the ui=html flag to your URL, i.e.

The fact that this disables Chat and a bunch of other nuisances just adds to the benefit.