Multi-Browser Support for SVG Diagrams
Written by Gregory W. Bond   
A recent blog post of mine discussed the current state of viewing ECharts javadocmachine SVG diagrams with different browsers. Given how close Safari 3 and Firefox 2 have gotten to achieving parity with the Adobe SVG plugin I decided to turn my attention to investigating what was necessary to achieve complete parity.

One problem was that tooltips weren't being displayed for either browser (ECharts machine diagrams generated by the javadocmachine translator include tooltips that display code comments for machine states, transitions, and the machine itself). After fixing a couple of bugs and adding a couple of workarounds I'm pleased to say that tooltips are now working for both Safari and Firefox.

Another problem is that it initially appeared that panning/zooming SVG diagrams was not possible in either browser. But readers of the ECharts discussion forums know that I later discovered Safari does indeed natively support panning and zooming after all. Furthermore, I have since found a Firefox extension that provides pan/zoom support. The extension's interface isn't as elegant as Safari's but it's functionally equivalent.

The upshot is that, by incorporating these changes, both Safari and Firefox have now achieved parity with the Adobe SVG plugin for viewing ECharts javadocmachine diagrams! Unless you're a dedicated IE user (poor soul) then the future looks bright! For a tootip example point your browser here, zoom in a bit and then let your cursor linger over the machine title at the bottom of the diagram. This diagram is part of the ECharts for SIP Servlets DK API javadocs.

Although I've checked in the changes to provide support for Safari and Firefox these changes won't be available until the next ECharts release. For those who want this support now, grab the files translator/lib/docmachine/ and translator/bin/javadocpp from the EChartsCPL Subversion trunk and replace the files in your ECharts SDK. If you're using the ECharts for SIP Servlets DK, then replace the files lib/docmachine/ and bin/javadocpp. Then regenerate your javadocs with the new files.

Discuss this article on the forums. (0 posts)
Last Updated ( Thursday, 13 December 2007 )