DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=36253>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=36253 Summary: Batik 1.6 draws a gray piechart even though it's supposed to be red Product: Batik Version: 2.0 Platform: Other OS/Version: Windows XP Status: NEW Severity: major Priority: P2 Component: SVGGraphics2D AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] I'm using Batik 1.6 to create a method to save as svg format to output my svg piechart using JFreeChart. The legend says that the piechart is suppoed to red, but the piechart is in gray color. I even tried to use Batik 1.5, the same result displays. Below is my code for saving to SVG, I don't know if anybody has encountered this problem before because I could not find anything like this in the search engine. public void saveChartToSVG( JFreeChart chart, OutputStream outStream, int width, int height ) throws Exception { if ( chart != null ) { DOMImplementation domImpl = GenericDOMImplementation.getDOMImplementation(); Document document = domImpl.createDocument( null, "svg", null ); SVGGraphics2D svgGenerator = new SVGGraphics2D( document ); // set the precision to avoid a null pointer exception in Batik 1.5 svgGenerator.getGeneratorContext().setPrecision(6); chart.draw( svgGenerator, new Rectangle2D.Double( 0, 0, width, height ), null ); boolean useCSS = true; Writer out = new OutputStreamWriter( outStream, "UTF-8" ); svgGenerator.stream( out, useCSS ); } } -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
