Sub drawCharts()
Dim toindexRows As Single, totalRows As Single, totalRows2 As Single
Dim xRow, yCol, cHeight, cWidth As Integer
Dim text As String
Dim chartname As String
Dim sRowHeight As Single
Dim VIMin As Single, VIMax As Single
xRow = 3
yCol = 1
cHeight = 31 'CHeight 定義為圖表所佔的列高
cWidth = 874
With Sheets("data")
VIMin = Int(Application.WorksheetFunction.Min(.Range(.[I5], .[I5].End(xlDown))) * 0.88 / 1000) * 1000
VIMax = Int(Application.WorksheetFunction.Max(.Range(.[I5], .[I5].End(xlDown))) * 1.12 / 1000) * 1000 + 1000
End With