In the process of integrating vector graphics into JSViz, we developed svg2vml, a library that provides a common interface for scripting vector graphics in browsers that support either SVG or VML. To use svg2vml you simply script your vector graphics using SVG syntax, and when your page is viewed in a browser that supports VML instead of SVG the library maps the SVG API calls to VML. You get vector support in multiple browsers without having to script to different implementations. The currently supported features are circle, ellipse, rectangle, line, and gradient.
The library lives in the Google Code project hosting site at http://code.google.com/p/svg2vml. There you will find a wiki with examples for using the currently supported features, and a project roadmap that lists future development plans. If you have any questions, or comments, or would like to contribute to the project you can email us (see project site for contact info).
Howdy friends, I've just uploaded another patch to 0.3.3. This patch covers some issues from the discussion board:
Improved SVG Rendering Performance
See the discussion here. No interface changes were required.
Added configurations for "type-driven" Force Directed Graph attributes
See discussion here. The constants used by ForceDirectedLayout.js have been removed in favor of a default configuration.
See comments and code in Example Force Directed Graph for more details. I don't currently have a good example of directed edge configurations (If you make one, I'd love to use it!).
Modified HTMLGraphView to place graph in contained
Until now, containers were used to help dictate graph placement, but HTML elements in graphs were rendered in the document.body. This made it difficult to use relatively positioned containers, and impossible to assert that if your graph exceeds the bounds, it doesn't overlap other content. No interface changes were required for this update.
Example #1: Our Snowflake Graph in a containing DIV
Example #2: Our Snowflake Graph in a relative-positioned containing DIV, with hidden overflow
There are a handful of other feature requests on the code site. I'm not sure which of these will make it into 0.3.3, but I'm expecting to do one more patch before 0.3.4.
Ideas, contributions, and comments are always welcome. The discussion board is the best place for feedback and help.