highstock的tooltip浮窗保留两位小数
tooltip: {
split: true,
shared: true,
followTouchMove: true,
shape: 'callout',
//xDateFormat: '%Y-%m-%d %H:%M:%S.%L',
xDateFormat: '%Y-%m-%d',
headerFormat: '<small>{point.key}(总时间:{point.stackTotal}小时)</small><table>',
pointFormat: '<tr><td style="color: {series.color}"><b>{series.name}: </b></td>' +
'<td style="text-align: right"><b>{point.y:.2f}小时</td></tr>',
footerFormat: '</table>',
},
从上面可以看出point.y:.2f的冒号以及后面的内容是关键
以下是效果图