I am displaying a bar chart and trying to have the labels above bars displayed in correct locale (they are floats). I am developing in JasperSoft Studio 6.2.0. I set the global and/or the report (execution-time) locale to en_US
, but the labels are still displayed in my Windows locale (nl_NL
). I then set the label expression to
new DecimalFormat("#,##0.0##;(#,##0.0##-)").format($F{Hours})
but it's still in Windows locale. Only when I explicitly set the label expression to en_US
locale:
NumberFormat.getInstance(Locale.US).format($F{Hours})
do I get the correct result. At other places (TextFields), setting the format pattern (e.g. to "#,##0.0##;(#,##0.0##-)"
) leads to the correct locale being applied. In bar chart settings, there is no way to specify the pattern in the same fashion, that's why I am trying to do that in code.
Is this a bug or am I missing something?