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)
Y axis of column chart shows improper data due to internationalization
bhavyasingh.k@gmail.com
<p>Hi,</p>
<p>I am new to BIRT. I am using BIrt version="3.2.21". I am not able to round the value to two decimal point for Spanish locale. </p>
<p>For example: The value displayed when locale is English is 5.75 which is correct</p>
<p>But for Spanish it is displaying as 575.0</p>
<p> </p>
<p>I want to understand on how to display correct value for Spanish for both chart and tabular data.</p>
Find more posts tagged with
Comments
Clement Wong
<p>In the report level design properties under Advanced, did you set Locale?</p>
<p> </p>
<p>I tested this in a later version of BIRT, and was able to set the Locale to "es_ES" for example. The data item, which had a decimal value at 5.749999, displayed <strong>5,75</strong> when I set the Format Number > Fixed. I left Locale at "Auto". Otherwise, you can explicitly set it here.</p>
<p> </p>
<p>When I removed the Locale value, it displayed 5.75 since my machine is set to a en_US locale.</p>
bhavyasingh.k@gmail.com
<p>Thank you for the reply
.</p>
<p>This worked for the tabular data . Can you please tell me on how i have to do for the chart.</p>
<p>For chart the Y-axis value for English locale is</p>
<p>0.000, 0.575 1.725, 2.300, 3.450, 4.025, 4.600, 5.175, 6.325</p>
<p>For spanish locale it shows</p>
<p>0, 0, 1, 2, 3, 4, 4, 5, 6 </p>
<p> </p>
<p>we can observe that after dot the digits are not getting displayed in spanish. how should i do for it..</p>
Clement Wong
<p>Did you set the Locale to "es_ES" (change this to your requirements) in the report level design's > Properties > Advanced > Locale?</p>
<p> </p>
<p>If you did set the Report's Locale (top most component), the chart will show (for example, the data value) in the locale's format. Again, I tested this in a later version of BIRT, and the chart shows the data point as 5,75 when I set the Locale to es_ES.</p>
<p> </p>
<p>Attached is a sample design created in BIRT 3.7.2. I don't have BIRT 3.2.2.1 available.</p>
bhavyasingh.k@gmail.com
<p>The report has to work for all the locales. I cannot set the locale only to Spanish. </p>
<p> </p>
<p>Is there any other way where in we can write some script code for charts to round of the values to 2 digits.</p>
Clement Wong
<p>Are you able to change the report design's locale dynamically in the beforeFactory event?</p>
<p> </p>
<p><span style="font-family:'courier new', courier, monospace;"><span>reportContext.getDesignHandle().setStringProperty("locale", params["pReportLocale"].value);</span></span></p>
bhavyasingh.k@gmail.com
<p>Hi Clement thanks for the reply. I can change the locale dynamically using the above mentioned code.</p>
<p> </p>
<p>The error got resolved i changed the "pattern" value under format charts, which helped.</p>