2

I'm looking for a library of XSLT to create SVG charts. I need pie charts, bar charts, line charts, all the usual suspects. I would hope for a reasonably simple DTD or Schema for the input files.

Edit: I have the raw data for the charts and a mechanism to convert it into what ever XML is necessary for the XSLT library.

Dimitre Novatchev
  • 240,661
  • 26
  • 293
  • 431
dacracot
  • 22,002
  • 26
  • 104
  • 152
  • Good question (+1). FXSL provides some support needed for such transformations -e.g. trigonometric functions. If you could provide a small (as small as possible) example of a source XML document and the desired output, with a description of how the input contributes to the output, I may try to create such a transformation. :) – Dimitre Novatchev Mar 23 '10 at 22:58
  • A simple example of what I am looking for is here... http://www.carto.net/svg/samples/xslt/ – dacracot Mar 23 '10 at 23:01
  • Have you tried a news group? http://tech.groups.yahoo.com/group/svg-developers/ Great question! – AMissico Mar 23 '10 at 23:07
  • It seems to me a charting component that can export to SVG would be more common. – AMissico Mar 23 '10 at 23:15
  • See the update to my answer. IMPORTANT: Don't try to access topxml.com without a good malware protection tool! – Dimitre Novatchev Mar 23 '10 at 23:21
  • I've got a GREAT malware protection tool... OSX! – dacracot Mar 24 '10 at 13:59

5 Answers5

2

Try SvgCharts4Xsl. Works with XSLT 1.0.

Frankline
  • 21
  • 2
1

http://www.dpawson.co.uk/graph2svg/ was recently mentioned on the XSL mailing list. Uses XSLT 2.0 however.

Martin Honnen
  • 160,499
  • 6
  • 90
  • 110
0

XSLT transforms between XML representations. So what are you looking to transform from ? It sounds like (perhaps) you need an SVG library such as Batik. Note that using Batik means you can write to a Java graphics component, and then output that as SVG (as opposed to JPG, PNG etc.)

Brian Agnew
  • 268,207
  • 37
  • 334
  • 440
  • 1
    I have data from a database that I can arrange however into XML, say columns and rows. I want an XSLT to apply that will convert my table data into a chart. – dacracot Mar 23 '10 at 22:46
  • 1
    Looks like Batik is a java library, not an XSLT library. – dacracot Mar 23 '10 at 22:46
  • It is indeed. But I refer you to the first sentence of my answer. – Brian Agnew Mar 23 '10 at 22:50
  • 1
    SVG is an XML representation, and I want to use XSLT to transform between my XML representation (that I am willing to adapt) and an SVG representation. – dacracot Mar 23 '10 at 22:57
0

You may try FXSL -- while it doesn't directly support SVG, it provides some functions necessary for some transformations -- for example trigonometric functions.

Update: There are a few XSLT stylesheets published by Martin Rowlinson (Marrow) -- the author of XSelerator, back in 2002. You may find them on topxml.com, but be warned that some people have alerted me that this site has a trojan on it -- therefore you should be equipped with good malware protection before clicking on the above link!

Dimitre Novatchev
  • 240,661
  • 26
  • 293
  • 431
  • Nice and maybe a tool for me to use if I have to roll my own SVG, but I was hoping to someone had done the math for me already. – dacracot Mar 23 '10 at 22:59
0

Found chartSVG.

dacracot
  • 22,002
  • 26
  • 104
  • 152