当我将X轴更改为日期时,数据点会发生变化

时间:2015-09-11 14:44:15

标签: excel vba charts

我想让我的情节显示X轴的日期我发布的图片显示了图形应该如何看待以及我想要改变的内容。

This is with integers for the X axis

如何获得下图,使误差条如上​​图所示,以覆盖下图。

Dates as X axis

1 个答案:

答案 0 :(得分:0)

我添加了* ... **行

   'GET RANGE FOR CHART X-AXIS LABELS
   got_label_range = True   ' True to re-activate the input range
   Set chart_labels = GetRange("Please select the range containing the LABELS" & Chr(13) & "(press ESC if no labels available)")
   **chart_labels.NumberFormat = "0.00"**
   If IsNotOk(chart_labels) Then
      got_label_range = False
   End If

   With .Chart.Axes(xlCategory).TickLabels
        .Alignment = xlCenter
        .Offset = 100
        .ReadingOrder = xlContext
        .Orientation = xlHorizontal
        **.NumberFormat = "m/d/yyyy"**
   End With