Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » [chart] custom number format - space to seperate thousands
[chart] custom number format - space to seperate thousands [message #954881] Tue, 23 October 2012 06:21 Go to next message
moritz du is currently offline moritz du
Messages: 98
Registered: February 2010
Member
i am already using
yAxisPrimary.setFormatSpecifier(JavaNumberFormatSpecifierImpl.create("###.###,##"));

to specify the number format for y-labels.

But how to substitute '.' by space? If i specify the format as "### ###,##" i get an exception:

...
Caused by: org.eclipse.birt.chart.exception.ChartException: Unquoted special character # in pattern "### ###.##"
	at org.eclipse.birt.chart.factory.Generator.build(Generator.java:1181)
	at chart.BarChart.renderAsStream(BarChart.java:309)
	... 32 more
Caused by: java.lang.IllegalArgumentException: Unquoted special character '#' in pattern "### ###.##"
	at com.ibm.icu.text.DecimalFormat.patternError(DecimalFormat.java:4711)
	at com.ibm.icu.text.DecimalFormat.applyPatternWithoutExpandAffix(DecimalFormat.java:4437)
	at com.ibm.icu.text.DecimalFormat.applyPattern(DecimalFormat.java:4203)
	at com.ibm.icu.text.DecimalFormat.applyPattern(DecimalFormat.java:4170)
	at 
...


So is there a way to freely customize the number format?

Re: [chart] custom number format - space to seperate thousands [message #954899 is a reply to message #954881] Tue, 23 October 2012 06:40 Go to previous message
moritz du is currently offline moritz du
Messages: 98
Registered: February 2010
Member
too late to edit my post,

sorry i google after posting and found

http://www.eclipse.org/forums/index.php/mv/msg/197585/

but how to script this in java? which class to extend? and how will the script look like if written in java?
Previous Topic:Render Task - Event Handler, Sorting/Filtering, etc.
Next Topic:Birt 3.7.2 and WAS (Websphare Application Server) 6.1
Goto Forum:
  


Current Time: Fri Apr 18 10:17:32 EDT 2014

Powered by FUDForum. Page generated in 0.04604 seconds