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)
Poor chart font quality
p3s
Hi all,
when i produce a report as pdf, the font quality of the charts (axis and title) is very poor. The font quality of a crosstab differs significant and look fine in all scaling factors. I tried all types of image output format and other file formats (htmt,ppt,...), with the same result.
I there a way to increase the quality of the text elements of a chart?
I'm using BIRT 2.3.0.
Thanks
Marcus
Find more posts tagged with
Comments
mwilliams
Hi Marcus,
I believe that charts are created as an image, which is why the text ends up different in a chart than in a crosstab as you described. One thing you can try to improve the quality of the text is to specify a resolution for the chart. I'm not sure the max resolution that BIRT can do, but try putting "reportContext.getAppContext().put("CHART_RESOLUTION", "300" );" You can play around with the number to see if you can get improvement.
Hope this helps.
mwilliams
Marcus,
Sorry. Forgot to say where to put that. If you're using the designer, you can put it in the beforeFactory method of the report. If not using the designer, I'm sure there's probably a way to use the chart engine API to set the resolution as well.
p3s
Michael,
it worked very well. Thanks a lot.
Regards,
Marcus
Dawton
I apreciated this solution too - thanx a lot
HansWurst
Hi folks,
this solution won't work for me.
I put reportContext.getAppContext().put("CHART_RESOLUTION", "300" );
in the beforeFactory script of my report.
But when I open my report in the webviewer to validate if the __dpi parameter in the generated URL has the right value (300) I only recognize that nothing happend. The __dpi parameter still has the (default) value 96.
Same result, if I run my report with the genReport.sh script.... bad resolution!
Any ideas? Why is there no simpler solution for solvig this problem? Mayby some configurartion files or something like that.
Regards,
Hans
mwilliams
Hi Hans,
What version of BIRT are you using? You don't see any difference in the chart's resolution after setting that?
HansWurst
Hi Michael,
I am using the Ganymede integrated version of Birt which is (in my case) 2.3.1 v20080905 and the version 2.3.1 of the birt runtime to execute the report on the console.
>> You don't see any difference in the chart's resolution after setting that?
No, the report still has 96 dpi.
Regards,
Hans
HansWurst
No one...?
huembeli
Hello,
to set the chart resolution from within the BIRT designer you need to set a number, not a string:
reportContext.getAppContext().put("CHART_RESOLUTION", 300);
The same is true from within a Java application. There you should write:
IRenderTask rtask = BIRTEngine.createRenderTask(rptdoc); rtask.getAppContext().put(EngineConstants.APPCONTEXT_CHART_RESOLUTION, new Integer(300));
At least for me this helped...
Daniel
mwilliams
Thanks Daniel! Sorry about the typo on my part up above.
vash
Michael,
I increased the chart resolution to 300dpi - but the size of the file increases by 5 times.
Is there a way to handle the file size?
-Vash
mwilliams
Vash,
I don't know of one, but if I find something, I'll let you know.
vash
Please let me know - as I have a report full of charts - and I have to increase the resolution for better quality of charts - since these reports go to clients.
Thanks,
Vash
mwilliams
Vash,
Does changing your image format of your chart change the size of the file?
vash
Currently I am using SVG chart output format.
I have a 3 page report(all charts) with chart resolution set to 300dpi and the pdf report size is 300k.
With other formats (JPEG, PNG, BMP) - the file size increases.
So SVG - is the best bet.
Thanks,
Vash
mwilliams
Vash,
I really don't think there's going to be anything you can do then, if using the smallest output format already. You're increasing the resolution of the charts, which increases the amount of data used to show them, so it's a give and take sort of situation. If you lower the resolution a little, you might be able to make the file size smaller but have good enough resolution for what you want.
vash
Michael,
It seems - its a give and take situation.
Anyways - thanks for your help.
-Vash
mwilliams
No problem. Anytime!
jsherriff
Michael,
Hey - I was just giving this a try...much nicer output for fonts in charts using this. However, it breaks mouseover tooltips. The coordinates in the area map are changed to reflect the new dpi and it looks like the browser doesn't like this. Using firebug, if I change the coordinates back to the "default", the tooltips work. Thoughts?
Joel
mwilliams
Joel,
So, where do the tooltips end up showing up? Outside the chart or not at all? Or does the report not show correctly at all? I don't know if there's a way to change this or not. What is your BIRT version? If it's the latest version, you might log a bug for this.
jsherriff
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="73326" data-time="1297723273" data-date="14 February 2011 - 03:41 PM"><p>
Joel,<br />
<br />
So, where do the tooltips end up showing up? Outside the chart or not at all? Or does the report not show correctly at all? I don't know if there's a way to change this or not. What is your BIRT version? If it's the latest version, you might log a bug for this.<br /></p></blockquote>
<br />
In this case, hovering over the bars does nothing but hovering over an area near the upper left corner of the chart generates the tooltips. We're still stuck on 2.3.2 so I 'fixed' it by tweaking JavaxImageIOWriter to adjust all of the coordinates in the imagemap based on the expected resolution vs the actual...basically:<br />
<br />
d = d * (96.0/new Double(this._ids.getDpiResolution()));
kik007
Joel,
can you tell me where i can find the JavaxImageIOWriter and where to change the code to yours "d = d * (96.0/new Double(this._ids.getDpiResolution()));"?
I have BIRT Version 3.7.0.v20110603 installed.
I have found the two ".jar-Files"
> org.eclipse.birt.chart.ui.extension_3.7.0.v20110414.jar
> org.eclipse.birt.chart.device.extension_3.7.0.v20110414.jar
but, not able to edit them. There are only Classes included.
Kai
vash
Michael,
I am using Birt 2.6.2 and I used reportContext.getAppContext().put("CHART_RESOLUTION", "300" ); in the beforeFactory method of the report. But i do not see any change in the chart's resolution.
Vash
mwilliams
Vash,
I don't know that this works like you'd think, in newer versions. In the newer versions, the image doesn't seem to get any clearer, but you can zoom in further. I don't know which version this started happening in. It seems buggy, though. You might look at the submitted bugs and eclipse.org/birt and see if it's been reported already. I would assume it has. Then, you can vote on the bug, if it exists. If not, you can create one.
abdulBirt
<p>Hi Michael, I was having an issue with text fonts in the chart. Now that i set the resolution it's looking good.But the tool tips are not showing up in the correct position. Any solution for this?</p>
<p>Thanks</p>