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)
Chart not showing up in HTML format for Birt 2.6
vivash
We are just moving from Birt 2.3 to 2.6. We noticed that for some reasons the charts are not showing up in Birt 2.6 for html format. They show up fine in both rptdocument and pdf output, but not in html. I've tried all different browsers, but they still don't show up. In Birt 2.3 it was all ok.
Anyone know if there is any change required for HTML output (font change, svg configuration or something) in Birt 2.6?
Thanks,
-vivek
Find more posts tagged with
Comments
JasonW
Are your charts specified as SVG or one of the Image variants?
Is this in the designer?
Jason
vivash
The output format for the chart is defined as "SVG". This is happening after deploying the report on tomcat. We can't run some of the reports in designer due to db and some back-end requirements.
The charts show up fine in rptdocument and pdf types, but not in html (in Birt 2.3 it was ok). Any ideas?
Thanks,
-vivek
vivash
I just tried to change the output format to "Jpg" and that worked fine in html. My browser is SVG enabled and if I revert back to Birt 2.3 the report charts are showing in svg just fine in the same browser. So, it has to be something with Birt 2.6 (or intermediate releases after 2.3).
I saw this related bug,
https://bugs.eclipse.org/bugs/show_bug.cgi?id=258627
- not sure if that is causing any issue - I doubt though.
I'm surprised no one else has complained of this issue. Am I missing something here?
Thanks,
-vivek
vivash
Ok, found the problem. I was still using old 2.3 web.xml and looks like there are some new properties in web.xml for 2.6. I changed the web.xml to use the latest one and html SVG charts work fine now.
Thanks for all the help.
-vivek
vivash
I think I spoke too fast, the problem still seems to be happening. Now, it's not consistent - sometime I see the SVG chart and sometimes not in HTML output. Note, the problem is with only SVG chart in HTML output type.
Anyone else have faced similar issue with Birt 2.6 or earlier?
Thanks,
-vivek
JasonW
Is this in the preview of the report or deployed?
Jason
vivash
For deploy. Looks like it's doing some sort of toggle on visibility. We use iframe to integrate html output into the flex application. Now with Birt 2.6 sometimes the chart show up, but sometimes they don't. I looked into the frame source and it has this comment,<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
/**
* This JavaScript library defines classes and methods to handle interactivity
* actions on Chart, it is valid for SVG format.
*
*
@since
2.5.1
*/
BuildHelper = function (tag, attrList, text) {
..
..
function toggleVisibility(evt, id, compList, labelList) {
var mainSvg = evt.target.ownerDocument;
var isHidden = true;
..
..
</pre>
<br />
Looks like this is all new code since 2.5.2, could this cause any visibility issue? If I move around tabs in our application, sometimes the chart show up, but it's not consistent. I've tried both Chrome and IE browsers.<br />
<br />
Thanks,<br />
-vivek
JasonW
I have seen this behavior when previewing in the designer, but not deployed. Can you log a bug for this?
Jason
vivash
Ok, opened a jira -
https://bugs.eclipse.org/bugs/show_bug.cgi?id=324348
JasonW
Thanks for opening it.
shahamar
I work on same product where vivash is working.
To add to the problem scenario
1. Problem is seen when HTML report is generated through BIRT engine integrated in webapplication. In birt 2.3 any SVG chart in HTML report generated like this was generated as PNG and included in final HTML using imagemap. Where as with Birt 2.6 the same SVG charts in HTMl reports are generated as .svg images and included via <embed> tag.
2. If the same html report is accessed through IE ( I used IE8) charts are not seen - as charts are in SVG format and there is not SVG plugin added). If we install SVG plugin charts are visible. Same html report accessed through mozila firefox (3.0.19) SVG charts are visible as mozilla seems to have inbuild SVG support.
Question is how does SVG charts were generated as PNG images in HTML report in Birt 2.3 where as for same HTML reports SVG charts are generated as SVG in BIRT 2.6.
shahamar
I work on same product where vivash is working.
To add to the problem scenario
1. Problem is seen when HTML report is generated through BIRT engine integrated in webapplication. In birt 2.3 any SVG chart in HTML report generated like this was generated as PNG and included in final HTML using imagemap. Where as with Birt 2.6 the same SVG charts in HTMl reports are generated as .svg images and included via <embed> tag.
2. If the same html report is accessed through IE ( I used IE8) charts are not seen - as charts are in SVG format and there is not SVG plugin added). If we install SVG plugin charts are visible. Same html report accessed through mozila firefox (3.0.19) SVG charts are visible as mozilla seems to have inbuild SVG support.
Question is how does SVG charts were generated as PNG images in HTML report in Birt 2.3 where as for same HTML reports SVG charts are generated as SVG in BIRT 2.6.
JasonW
There is a flag for supporting the SVG output. Are you using:
renderOption.setSupportedImageFormats( "PNG;GIF;JPG;BMP;SWF;SVG" );
Just remove the SVG.
Jason
shahamar
We are not setting any such render option. What shall be the default supported image formats in HTMLRenderOption? <br />
<br />
In Birt 2.3.2 Vs Birt 2.6. As our same server side code used to generate PNG images for SVG charts in HTML reports. Upgrading it to Birt 2.6 it started generating SVG images for SVG charts in HTML reports.<br />
<br />
<blockquote class='ipsBlockquote' data-author="'JasonW'" data-cid="68680" data-time="1285191323" data-date="22 September 2010 - 02:35 PM"><p>
There is a flag for supporting the SVG output. Are you using:<br />
renderOption.setSupportedImageFormats( "PNG;GIF;JPG;BMP;SWF;SVG" );<br />
Just remove the SVG.<br />
<br />
Jason<br /></p></blockquote>
JasonW
The Chart will try to render to the output format set in the design if you do not set the string above.
Jason
vivash
Here is our setting for html,<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
if(outputType.equals(REPORT_OUTPUT_TYPE.HTML.typeName())){
renderOption.setEmbeddable(true);
renderOption.setBaseImageURL(baseImageUrl);
renderOption.setImageDirectory(imageDirectory);
renderOption.setBaseURL(baseUrl+"/frameset");
}
</pre>
<br />
After adding the following to the block,<br />
<br />
renderOption.setSupportedImageFormats( "PNG;GIF;JPG;BMP;SWF");<br />
<br />
<br />
it seems to work - we see the charts fine now. Now the question is, is any of the above setting not applicable in Birt 2.6 anymore? The above settings used to work fine in 2.3 and the images were automatically converted to PNG. Is there any similar change for other output types? We are also having problem with Excel output where charts area is coming as empty space and some warning.<br />
<br />
Thanks,<br />
-vivek
JasonW
Vivek,
I do not remember what the change was on the image. It might have been a default option change. The options you have are fine in the code above and should still work fine. The error you are having on the xls type might be a change in the xls emitter code. Have you logged a bug for it yet?
Jason
vivash
Thanks Jason. Yes, I did open a bug sometime back on this issue,
https://bugs.eclipse.org/bugs/show_bug.cgi?id=325914
, but haven't found any configuration change or some centralized fix instead of hiding the chart/image in each report for Excel type.