RangeMarker: text in SVG not displayed (FOP/Batik)

A discussion forum for JFreeChart (a 2D chart library for the Java platform).

RangeMarker: text in SVG not displayed (FOP/Batik)

Postby mhilpert » Fri Nov 04, 2016 12:30 pm

I wondered why my simple JFreeChart test worked and the final result in our application doesn't show the marker texts. I hunted it down to the point, where the generated SVG from JFreeChart still has the marker texts but the chart in the final PDF document hasn't. The PDF is generated via FOP (that uses interally Batik to include SVGs). The SVG source code is:

Code: Select all
<g style="fill:gray; text-rendering:geometricPrecision; font-size:8px; shape-rendering:crispEdges; font-family:'Frutiger LT 45 Light'; stroke:gray;"
    ><line x1="39" x2="41" y1="22.0211" style="fill:none; clip-path:url(#clipPath1);" y2="22.0211"
      /><line x1="44" x2="672" y1="149.3404" style="clip-path:url(#clipPath2); fill:none; opacity:0.8; stroke:red; stroke-width:0.5;" y2="149.3404"
      /><text x="47" y="144.0177" style="clip-path:url(#clipPath2); fill:red; opacity:0.8; stroke:none; stroke-width:0.5;" xml:space="preserve"
      ><line x1="44" x2="672" y1="98.4127" style="clip-path:url(#clipPath2); fill:none; opacity:0.8; stroke:yellow; stroke-width:0.5;" y2="98.4127"
      /><text x="47" y="93.0899" style="clip-path:url(#clipPath2); fill:yellow; opacity:0.8; stroke:none; stroke-width:0.5;" xml:space="preserve"
      ><line x1="44" x2="672" y1="47.485" style="clip-path:url(#clipPath2); fill:none; opacity:0.8; stroke:green; stroke-width:0.5;" y2="47.485"
      /><text x="47" y="42.1622" style="clip-path:url(#clipPath2); fill:green; opacity:0.8; stroke:none; stroke-width:0.5;" xml:space="preserve"

I wonder, why "stroke:none" is set - is this the problem? But why does firefox display the text when the SVG is opened with it?
using JFreeChart 1.0.15 with JDK 1.7.0_25
Posts: 494
Joined: Wed Apr 02, 2003 1:57 pm
Location: Germany

Return to JFreeChart

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 9 guests