}
private SVGContentImage getSVGImage(JFreeChart chart, ChartConfig config)
throws SVGGraphics2DIOException {
// Get a DOMImplementation
DOMImplementation domImpl = GenericDOMImplementation
.getDOMImplementation();
// Create an instance of org.w3c.dom.Document
String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI;
org.w3c.dom.Document document = domImpl.createDocument(svgNS, "svg",
null);
// Create an instance of the SVG Generator
SVGGraphics2D svgGenerator = new SVGGraphics2D(document);
// Ask the chart to render into the SVG Graphics2D implementation