Drawing floating columns/bars in Flot

Let me say first of all, that I mostly like Flot as a charting application. It provides a lot of charting functionality and is reasonably good looking. But sometimes it is a bit of a pain to deal with. Case in point; I wanted to create a chart that had floating columns (Flot, in my opinion incorrectly, calls vertical columns, bars). In essence, what I wanted was this: Well, it can be done but, after I spent far too many hours trying to figure out how, it is not exactly clear

Webview orientation with Phonegap

I was having this really weird problem in PhoneGap where when the orientation would change the webview would not resize to fit the whole screen.  Turns out that the meta viewport tag was causing the problem.  My viewport setting was this: 1 <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/> So when I would re-orient my iPad to landscape it would still be using the device-width setting for its width.  So what I did was bind to the orientationchange event and call a JavaScript function each time the page re-oriented.  That

Get viewport size width and height with javascript – Javascript – Blog / Andy Langtons Website

Get viewport size width and height with javascript – Javascript – Blog / Andy Langtons Website. This is a neat little snippet of JavaScript code to get the size of your viewport on a browser.  I’m doing some work with progressive HTML rendering and viewport height is pretty important there.  This seems to  work.  Will be having a longer blog post coming up on the topic of progressive rendering.

Transform performance on mobile applications

Just a quick one today.  I have read on several web pages that if you want to speed up the rendering of your site that you need to add -webkit-transform: translate3d(0,0,0) to the page elements to have the browser use the GPU to render the page instead of the CPU. I tried this trick several times and it never seemed to work.  But I think that today I figured out why not. I would apply this trick to a container element that houses the things that were animating.  This may not

Handling clicks for mobile platforms [UPDATED]

I’ve been doing a lot of work in Phonegap lately and I really like it.  However, one of the things I don’t like is that click events are really, really slow.  There’s a reason for this.  How does the browser know if it’s a click or the beginning of a move?  The answer to this is to bind your click events to the “touchend” event. So, in JQuery you would previously do something like this. 1 target.bind(’click’, callback); But that introduces the lag.  So I wrote a little function where