How to use format/formatter in HTML5 charts

0

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 http://api.highcharts.com/highcharts. 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:

chart.events.click="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,'chart.events.click',"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: 4 years 8 months ago

2 Answers:

-2
hozawa's picture
52642
Joined: Apr 24 2010 - 4:31pm
Last seen: 5 months 1 week 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 - 5 years 7 months ago
0

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: 4 years 8 months ago

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

longman2004 - 4 years 8 months ago

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

arkhom.khamthip - 4 years 8 months ago
Feedback