---
# System prepended metadata

title: HighChart
tags: [套件]

---

[參考文件](https://www.runoob.com/highcharts/highcharts-setting-detail.html)
toolTip是畫面游標移到圖表上方數值的提示框。
可用console.log(this)查看可用屬性
可顯示至小數點下兩位，千分位為','
```javascript
tooltip: {
    formatter: function() {
		console.log(this);
		return this.series.name + "<br>" + Highcharts.numberFormat(this.y, 2, ".", ",");
		},
},
```
ec7101
```javascript=650
legend: {//標籤提示
    backgroundColor: 'white',
    borderColor: '#CCC',
    borderWidth: 1,
},
tooltip: {//工具提示
    headerFormat: '<b>{point.x}</b><br/>',
    pointFormat: '{series.name}: {point.y}<br/>設備總用電: {point.stackTotal}'
},
plotOptions: {//繪圖選項
    column: {
    stacking: 'normal',
    }
},
```