* @throws IOException
*/
private static synchronized void handleSVG (ByteArrayOutputStream baos, JFreeChart chart, int width, int height)
throws IOException {
OutputStreamWriter writer = new OutputStreamWriter(baos, "UTF-8");
DOMImplementation domImpl = GenericDOMImplementation.getDOMImplementation();
Document document = domImpl.createDocument("cewolf-svg", "svg", null);
SVGGeneratorContext ctx = SVGGeneratorContext.createDefault(document);
// ctx.setComment("Generated by Cewolf using JFreeChart and Apache Batik SVG Generator");
SVGGraphics2D svgGenerator = new SVGGraphics2D(ctx, false);
svgGenerator.setSVGCanvasSize(new Dimension(width, height));
chart.draw(svgGenerator, new Rectangle2D.Double(0, 0, width, height), null);