SVG or Scalable Vector Graphics is a powerful way to render vector graphics on screen and print media. Propelled by its adoption and availability of editors, it has become the de-facto standard for creating and publishing vector graphics.
SvgCharts4Xsl is a set of utility XSL templates, written in XSLT 1.0, for SVG charting. It can be used to embed SVG images in your HTML and PDF documents (via XSL-FO). If you want to convert the generated SVG to a raster format (JPEG/PNG/TIFF) from a Java application, consider using Batik.
Currently SvgCharts4Xsl supports the following types of charts:
Line Chart: Plots both positive and negative values.
Bar Chart: Plots both positive and negative values.
Pie Chart: Plots only positive values, negative values are discarded. Uses EXSLT extensions to overcome the limitations of XPath 1.0, hence may not work with all transformers.
Usage
Import/include the respective chart XSL file in your stylesheet and call the appropriate method with required arguments (some are optional). For generating standalone SVG files, use appropriate DOCTYPE tag as shown in the examples.
Download
You can download this project in either
zipor tar formats.
Sample Outputs
Shows up correctly only on SVG 1.1 compliant browser (E.g: Google Chrome)