How to use format/formatter in HTML5 charts

i create stackcolumn HTML5 chart in Jaspersoft Studio 5.5.0 and want to format yAxis labels and stackLabels on it. try many different cases, but it is fail. i have added such proprties as:

yAxis.labels.format="\$ {y}"

yAxis.stackLabels.format="Totals: \$ {total}"

all examples from but on the chart i see only numbers without my additional options. where is truly worked examples?


another problem that i can't use JavaScript function as Chart Properties.. Jasper Studio is working bad with them. i can add function in the window Chart Properties:"function(event) {alert ('x: '+event.xAxis[0].value +', y: '+event.yAxis[0].value);" 

but after running that report i see in HTML-source such row:

JRDefaultHighchartsSettingService.setProperty(highchartsConfig_13456883_22_2115148971,'',"function(event) {alert (\'x: \'+event.xAxis[0].value +\', y: \'+event.yAxis[0].value);");

if i delete symbols " and \ then such code is working as i want.. it is very looks like the bug! very annoying bug..

fix it! and please help with format functionality.. thanks

longman2004's picture
Joined: Mar 18 2013 - 5:55am
Last seen: 8 years 4 days ago

2 Answers:

hozawa's picture
Joined: Apr 24 2010 - 4:31pm
Last seen: 3 years 9 months ago

yes, i have seen.. but my question was about another attributes than described in your recommended post.. can you repeat my steps with:
yAxis.labels.format="\$ {y}"
yAxis.stackLabels.format="Totals: \$ {total}"

and get answer what is your result for this case? thanks

longman2004 - 8 years 12 months ago

Hi longman2004,

Did you get the answer? I am having the same problem on 'column chart' too

arkhom.khamthip's picture
Joined: Mar 24 2015 - 4:32am
Last seen: 8 years 4 days ago

No.. This problem as for me like a bug.. Don't know what situation now.. It was much time ago)

longman2004 - 8 years 4 days ago

Thanks much for your reply. I would treat this issue as a bug in version 5.5.0

arkhom.khamthip - 8 years 4 days ago