I am trying to implement the SVG demo (package demo.svg) from the section 17.3.3 of the manual in NetBeans with Batik 1.6 (Batik 1.7 does not seem to have some of the required classes) and JFreeChart 1.0.13
At the line
chart.draw(svgGenerator, new Rectangle2D.Double(0, 0, 400, 300), null);
Netbeans complains that the draw method does not take a SVGGraphics2D object and refuses to compile
Inspection of the code shows that JFreeChart.draw takes a Graphics2D object.
Since no one else has reported this problem I assume that I am overlooking something obvious but I would be grateful if someone would tell me what it is.
NetBeans with Batik 1.6
-
- Posts: 2
- Joined: Thu Jul 12, 2018 5:10 am
- antibot: No, of course not.
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Re: NetBeans with Batik 1.6
Unless you have a strong reason for wanting to use Batik, I would recommend JFreeSVG - it is a simpler dependency, much smaller jar file, and the code runs faster:
http://www.object-refinery.com/blog/blog-20140423.html
http://www.object-refinery.com/blog/blog-20140423.html
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

