Jump to content
  • 0

Percentage in Y-Axis Values


eunha
 Share

Question

I'm trying to add  a percentage symbol in the Y-axis values of my Column Chart DataPage using the Formatting feature. They are displaying as percentage, however, all the values are being changed. I just want to add a percentage symbol and retain the values as is. Can someone help with this?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

This is possible using the formatter function of Highcharts. You may paste this on your DataPage Footer.

<script type = "text/javascript" >
var timer = setInterval(function() {
//Find if chart exists using rect element every x milliseconds
if (document.getElementsByTagName('rect') != null) {
//Update Chart
UpdateChart();
}
}, 500);
function UpdateChart() {
try {
Highcharts.charts[0].update({
yAxis: {
  labels: {
    formatter: function() {
       return this.value+"%";
    }
}
}
});
//Stop checking
clearInterval(timer);
} catch (err) {
//log errors
}
};
</script>

This will be the result:

image.png.c199aff07f7b43776276c8cdadbbd8c5.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...