Is it possible to have sharp or at least not very blurry charts in JasperReports when exported in HTML format?
I use SVG chart renderer type, which is fine for PDF exports. HTML exports remain blurry.
I tried to create SVG programaticaly with JFreeChart and BatikRenderer (using a scriptlet). I get SVG XML which i set as String variable in jrxml file and use it in image element:
<image scaleImage="FillFrame">
<reportElement positionType="Float" x="401" y="566" width="159" height="124" uuid="1baa80f7-3151-4fb8-be85-140059e9e28e"/>
<imageExpression>
<![CDATA[net.sf.jasperreports.renderers.BatikRenderer.getInstanceFromText($V{Chart})]]>
</imageExpression>
</image>
With this approach image is still blurry (later i noticed all image resources in HTML export are in .png format).
Using code below still generates PNG image in HTML export
net.sf.jasperreports.renderers.BatikRenderer.getInstanceFromText("<svg xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.0\" width=\"100\" height=\"100\"><circle cx=\"50\" cy=\"50\" r=\"40\" stroke=\"green\" stroke-width=\"4\" fill=\"yellow\" /></svg>")
Is there a way to use generated SVG XML inside of Jasper report or any other solution to get sharp images of charts in HTML file? I was also considering using generated SVG XML inside of TextField component with HTML markup but i don't think that's possible with all HTML tags, just basic ones like <b> and <br>.