NetBeans with Batik 1.6

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
thanhduy79
Posts: 2
Joined: Thu Jul 12, 2018 5:10 am
antibot: No, of course not.

NetBeans with Batik 1.6

Post by thanhduy79 » Mon Jul 16, 2018 4:04 pm

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.

david.gilbert
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

Post by david.gilbert » Mon Jul 16, 2018 8:01 pm

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
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked