Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Charts give error resizeSVG is not defined
hallj05
<p>Hey, we are using Open Source BIRT version 4.4.1 and are using the BIRT viewer tag library to display reports in our web app. BIRT is deployed on the same server as our app.</p>
<p> </p>
<p>When we run reports that have a chart with an output type of SVG then we get the following error. (This was working before) I can change the output type to something else and it will display correctly in Chrome, but not in IE. I need it to work in IE, which the version that I'm using is IE11.</p>
<p> </p>
<p> </p>
<p>Here is the error that shows up in Chrome for this.</p>
<p>Uncaught ReferenceError: resizeSVG is not defined</p>
<p> </p>
<p> </p>
<p>Any idea as to why this error has started to happen or how to fix it so that charts display using SVG.</p>
<p> </p>
<p>Thanks!</p>
Find more posts tagged with
Comments
Clement Wong
<p>I have OS BIRT 4.4.2 and am able to view reports with an SVG charts in IE 11 and Chrome, when generated from the Designer.</p>
<p> </p>
<p>Are you able to test a simple report with SVG from the Designer using the same problematic browsers?</p>
<p> </p>
<p>So SVG used to work before in both Chrome and IE 11 until recently? There appears to be other factors that would cause this.</p>
<p> </p>
<p>You mentioned that you are using the BIRT Viewer Tag library, what does your HTML page look like? Did you make any changes there? Do you have a DOCTYPE declaration. If so, what is it?</p>
<p> </p>
<p>Did you change your underlying app server, or upgrade it?</p>
<p> </p>
<p>Is that error you referenced from Chrome DevTools (F12) console?</p>
hallj05
<p>Yeah, I don't think it's the browsers the issue since it used to work in these browsers before.</p>
<p> </p>
<p>I'm thinking that it has to be some change that was made elsewhere in the code (since this software is still in development). Since the reports used to work with no issues and then they just started to give this error, but I'm not sure how long it's been doing this so I can't compare all changes made recently to see what else could be causing this.</p>
<p> </p>
<p>Yes, the error was showing in the Chrome DevTools, and it shows it happening in a file that is from Actuate (showing sample part of this below)</p>
<p> </p>
<p> * Contributors:<br>
* Actuate Corporation - initial API and implementation<br>
*******************************************************************************/<br>
/**<br>
* This JavaScript library defines classes and methods to handle interactivity<br>
* actions on Chart, it is valid for SVG format.<br>
*<br>
*
@since
2.5.1<br>
*/</p>
<p> </p>
<p> </p>
<p>We are using the BIRT Viewer Tag library and our page for it looks like below (which this hasn't changed since it was working)</p>
<p> </p>
<p><div class="Birt"><br><br>
<!--Call the BIRT view using the passed in report design name--><br>
<birt:viewer id="${param.id}" reportDesign="${param.reportDesign}" pattern="frameset" format="html" scrolling="yes" height="${param.reportHeight}" width="${param.reportWidth}" showParameterPage="false"><br><br>
<!--Include the passed in parameters to the BIRT report--><br>
<c:forEach items="${param}" var="par"><br>
<c:if test="${par.key != 'reportDesign'}"><br>
<birt:param name="${par.key}" value='${par.value}'></birt:param><br>
</c:if><br>
</c:forEach><br><br>
</birt:viewer><br>
</div></p>
Clement Wong
<p>I'm not sure if I saw answers to my previous question... Are you able to test a simple report with SVG from the Designer using the same problematic browsers?</p>
<p> </p>
<p>In regards to the HTML page with the BIRT tag library references, do you have a DOCTYPE declaration at the beginning. If so, what is it?</p>
hallj05
<p>Sorry for the delay in response. I didn't notice that you had responded.</p>
<p> </p>
<p>We have discovered that the following jar seems to be causing the issue:Saxon-HE-9.4.jar</p>
<p> </p>
<p>How do we make it so that the Birt graphs work with us having that jar? Since Saxon is used elsewhere in the app.</p>
Clement Wong
<p>I'm not sure about Saxon-HE-9.4.jar and how you are using it with BIRT.</p>
<p> </p>
<p>BIRT 4.4.2 ships with org.eclipse.wst.xsl.saxon_1.0.200.v201103081755.jar.</p>
<p> </p>
<p>So did you confirm that a simple report with a SVG chart from the Designer using the same problematic browsers works OK?</p>
hallj05
<p>The Saxon jar was getting used elsewhere in the application.</p>
<p> </p>
<p>If I remove the jar then the reports would work again without issue.</p>
<p> </p>
<p>The fix that we are using to make the reports work with the Saxon jar is we put the following where we defined all our BIRT params</p>
<p> </p>
<p> Properties props = System.getProperties();<br>
props.put("javax.xml.transform.TransformerFactory", "org.apache.xalan.xsltc.trax.TransformerFactoryImpl");<br>
System.setProperties(props);</p>