Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Highcharts yaxis labels Format

Is there any way to format yaxis into something I want.

In fact, sometimes on the yaxis the data is shown with (k) on the right instead of thousand.

I want to remove (k). How can I do it?

The image of yaxis I want:

enter image description here

like image 791
bahar_Agi Avatar asked Apr 16 '13 18:04

bahar_Agi


People also ask

How do I text a Yaxis label?

format: string A format string for the axis label. The context is available as format string variables. For example, you can use {text} to insert the default formatted text. The recommended way of adding units for the label is using text , for example {text} km .

How do I change the y axis title in Highcharts?

highcharts-title:eq(1) tspan'). text('NEW Y-AXIS TITLE'); to set the title.


1 Answers

You can use formatter (http://api.highcharts.com/highcharts#yAxis.labels.formatter) and numberFormat() http://api.highcharts.com/highcharts#Highcharts.numberFormat()

http://jsfiddle.net/K2X3Y/

 yAxis: {
        labels: {
            formatter: function () {
                return Highcharts.numberFormat(this.value,0);
            }
        }
    },
like image 97
Sebastian Bochan Avatar answered Oct 14 '22 07:10

Sebastian Bochan