views:

69

answers:

4

I'd like to experiment with SVG as a way of displaying data-driven graphs, charts, etc. The data exists as xml, and I'll use XQuery to produce the xml. What options (eg, graphics libraries) should I consider for creating the SVG from the xml? Many thanks.

A: 

Here's an example from the W3C that uses Javascript to create a stacked bar chart as SVG from xml. I'd like to do something similar but use a graphics library (or ???) instead of js to handle the construction of axes, labels, titles, data points, etc. Depending on the results from playing with this, the next step would be user interaction with the graphs. Thanks.

A: 

If you're working with the SVG in Java, you could consider:

Batik is much larger (with tons of other stuff) so if SVG Salamander works for you I'd go with that.

I'm not sure from your question, though, whether you're looking for something to work with the SVG or something to create the SVG. If the latter, SVG is XML so you could use your XQuery to create the SVG output (which then can be interpreted in a browser by an SVG plugin or handled in Java with one of the above suggestions). Hope that helps.

ksclarke
A: 

One route to SVG is to use AT&T's GraphViz package - use XQuery to generate the intermediate text file in dot format from the XML and use GraphViz to do the graph layout and SVG generation.

Chris Wallace
A: 

Check out ChartSVG.

dacracot