Dashboard, WebKit, and Graphs

Although I wish I had a policy that everything could be done as nicely and easily as I wanted, I do not. Dynamic presentation of data using graphs should be a simple feat to accomplish, n’est pas? Clearly, their are many solutions in many languages, including PHP, JAVA, Python, all interfacing with various server-side imaging solutions like GD or ImageMagick. The problem is that none of the packages I have run across fit my nit-picky needs:

  • Anti-aliasing, anti-aliasing, anti-aliasing!
  • Various graph types (bar, area, pie, scatter, etc)
  • Speed, portability, highly customizable

    The 2nd item is provided by many, but the first is rare (from my research) and the third varies. “Hmm, I thought that this post was about Dashboard and WebKit,” you ponder. Well, Dave Hyatt may have my solution (still only partial, albeit): the canvas html element. Clearly, OS X offers some of the best 2D rendering of text and graphics today. The canvas HTML element leverages this superb ability of the system and supposedly truely allows one to programatically draw in any web page. I most recently have resorted to using Flash via PHP/SWF Charts, but I find it a bit clumsy and lacking in sophistication. Canvas may allow me to extend my taste for nice-looking graphics beyond my imagination. Only problem: Mac OS X Tiger/Safari only. As discussed by Ming Hong Ng (see comments), using canvas for such purposes is impractical for public web sites and destructive to the web experience™. So, this may not be my solution after all, but I still am curious about it and its potential.

    Dashboard, after being hammered for being a Konfabulator rip-off, has ascended into the higher-order of core Mac OS X technologies. I was most curious, however, as to how the stock ticker graphs were being generated. Being completely driven by WebKit, this gadget must either pull or create the graph. I’m hoping create is the correct response that that query. I’m inclined to believe the latter because the graph’s line has a characteristic Mac OS X anti-aliasing not seen in other web-generated graphs.

    Maybe I’m wrong about the canvas element, but I’ll consider anything to get away from jaggies!


About this entry

Related entries