Excel VBA Chart 刻度 Axis.DisplayUnit
Posted emanlee
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Excel VBA Chart 刻度 Axis.DisplayUnit相关的知识,希望对你有一定的参考价值。
With Sheets("Report").ChartObjects.Add(...)
.Chart.Axes(xlCategory).MinimumScale = RoundTo50(Sheets(sheetName).Range("M4"))
.Chart.Axes(xlCategory).MaximumScale = RoundTo50(Sheets(sheetName).Range("M124"))
.Chart.Axes(xlCategory).MajorUnit = RoundTo50((.Chart.Axes(xlCategory).MaximumScale - .Chart.Axes(xlCategory).MinimumScale) / 12)
.Chart.Axes(xlCategory).MinorUnit = .Chart.Axes(xlCategory).MajorUnit / 3
With Charts("Chart1").Axes(xlValue)
.DisplayUnit = xlHundreds
.HasTitle = True
.AxisTitle.Caption = "Rebate Amounts"
End With
REF:
https://stackoverflow.com/questions/10110594/how-to-round-off-x-ticklabels-to-the-nearest-50
以上是关于Excel VBA Chart 刻度 Axis.DisplayUnit的主要内容,如果未能解决你的问题,请参考以下文章