dojox.gfx on the iPhone

By on November 5, 2007 3:41 pm

Chris Mitchell of IBM had a few days of free time prior to the Dojo 1.0 release, and so he added Canvas support for dojox.gfx. While Canvas does not offer all of the DOM goodness of SVG, it does have one key features: it works today on the iPhone. While we expect the iPhone’s version of Safari to be updated to support SVG for vector graphics and charting very soon, it allows us to draw and chart natively on the iPhone now:

To include a chart in your Dojo app, first require the following modules:

And then in your HTML body, include a widget with the right parameters:

dojox.gfx now includes support for SVG, VML, Canvas, and Silverlight through one simple, SVG-inspired 2-D and 3-D drawing API!


  • Cool stuff! I am interested in updating my charting benchmark to include the iPhone as a supported browser. Last time I did this, Alex was nice enough to give me a package with all of the necessary code contained in one packed .js file to remove the performance hit of pulling in multiple files over the network. Is there an easy way to grab something similar for Dojo 1.0?


  • Are there any plans for building in support for Adobe Flex charts?



  • Hey Shane:

    Short story: no. There is frankly no need, and supporting a closed source, proprietary solution when we’ve got a completely open stack (not to mention the pain of the Flash/JavaScript bridge) makes supporting Flex’s charting engine something that’s not even on our radar.

    What we *will* be doing, however, is adding many of the features you know and like from Flex charting to Dojo’s browser-native charting engine. The current engine is pretty poweful, and we’re looking to extend it significantly very soon.


  • Pingback: Continuing Intermittent Incoherency » One-Oh-Oh Notes()

  • ypomonh

    These charts are very cool but where is the legend? I mean a chart must have a legend or some sort of data table to explain what these percentages are. It is not obvious to me how to inform the user about what the 25% represents :-/