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 images being resized incorrectly
senyahnoj
I have a bar chart developed in Helios BIRT Designer 2.6. It has an imagemap over the chart which activates javascript click event scripts.
I have deployed the same .rptdesign file on 2 Tomcat 6 servers using identical installs of PHP/JavaBridge with Birt Report Runtime 2.6.2.
Server 1:
Linux - java version "1.6.0_20"
Server 2:
Windows 7 - java version "1.6.0_24"
Both are being tested in the same web browser.
On linux the image and image map line up perfectly. On the windows deployment the image and the image map are significantly out of alignment. The image map covers an area bigger than the displayed image.
The chart image is 767x414 pixels in size.
On investigation, the windows deployment is creating the chart image (PNG) as a 959x518 image on the server (i.e. too big) and resizing it down in the rendered HTML (using css height and width). The linux deployment is creating the chart image correctly as a 767x414 pixel image.
It looks as if the image map coordinates are being generated for the larger image which is reduced in size by the HTML - thus making the 2 things not match up.
Has anyone got any idea why this might be happening?
Find more posts tagged with
Comments
JasonW
Are you specifically setting the chart size in pixels?
Jason
senyahnoj
I've now specifically set the width and height in the General Properties tab to pixels (It was displaying inches before). The problem still persists...<br />
<br />
<blockquote class='ipsBlockquote' data-author="'JasonW'" data-cid="77126" data-time="1305661604" data-date="17 May 2011 - 12:46 PM"><p>
Are you specifically setting the chart size in pixels?<br />
<br />
Jason<br /></p></blockquote>
JasonW
Is it possible to reproduce the issue with the sample db so I can debug it? Btw can you try changing the chart dpi in the beforeRender script?
reportContext.getRenderOption().setOption("ChartDpi",300);
Try different values.
Jason
senyahnoj
Thanks for looking at this Jason.<br />
<br />
Attached is a rptdesign document using the sample db:
JasonW
Ok I reproduced it on my machine and to fix it I adding the following to the task:
$report = $birtReportEngine->openReportDesign("${here}/chartdpi.rptdesign");
$task = $birtReportEngine->createRunAndRenderTask($report);
$task->getAppContext()->put("CHART_RESOLUTION", 96);
Jason
senyahnoj
Works a treat - thanks very much indeed!