About the tooltip that appears when you hover your cursor over the graph
Please tell me how to display the displayed numbers as comma-separated values.
30,000 → 30,000
Set lang.thousandsSep
in Highcharts.setOptions
.You must also specify the format in tooltip.pointFormat
.
http://api.highcharts.com/highcharts#lang.thousandsSep
Highcharts.setOptions({
lang: {
decimalPoint: '.',
thousandsSep:', '
}
});
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container'
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
tooltip: {
pointFormat: "Value: {point.y:,.1f}mm"
},
series: [{
data: [1029.9, 1071.5, 1106.4, 1129.2, 1144.0, 1176.0, 1135.6, 1148.5, 1216.4, 1194.1, 1095.6, 1054.4]
}]
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="http://code.highcharts.com/highcharts.js"></script>
<divid="container" style="height:300px"></div>
© 2024 OneMinuteCode. All rights reserved.