Provide label formatter with unformatted number

Description

The following code shows how to provide label formatter with unformatted number.

Example


<!DOCTYPE html>
<html>
<head>
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<script type='text/javascript'>
$(function () {<!--from  www  . j ava  2s .co  m-->
    $('#container').highcharts({
        chart: {
            type: 'area'
        },
        xAxis: {
            labels: {
                formatter: function () {
                    return this.value; // clean, unformatted number
                }
            }
        },
        series: [{
            name: 'B',
            data: [null, 10421, null, 123, null, 6, 11, 32, 110, 235, 369, 640,
                10871, 123, 123, 10527, 10475,123 , 10358, 10295, 10104]
        }, {
            name: 'A',
            data: [
                5, 25, 20000, 120, 19000, 200, 426, 660, 16000, 1060, 1605, 2471, 3322,
                21000, 12, 123, 18000, 18000, 17000,123 ]
        }]
    });    
});
</script>
</head>
<body>
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="min-width: 310px; height: 400px; max-width: 800px; margin: 0 auto"></div>

</body>
</html>

Click to view the demo





















Home »
  highcharts »
    Axis »




Axis
Axis Data
Axis Label
Axis Plot
Axis Tick
Axis Title