Jump to content
JasperReports Library 7.0 is now available ×

How to use format/formatter in HTML5 charts


Recommended Posts

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

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

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

Link to comment
Share on other sites

  • 11 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...