I am having a problem when I try to rescale my chart
my chart uses hour time as the X-axis and residual as Y-axis
when I work with days on the X-axis it works fine but I also need to work with hour
above its the chart which I want to keep but sometimes I need to change the period and then I need to rescale the chart but when I rescale it and then this happens
what should I do?
here is the VBA code to rescale the chart
my chart uses hour time as the X-axis and residual as Y-axis
when I work with days on the X-axis it works fine but I also need to work with hour
above its the chart which I want to keep but sometimes I need to change the period and then I need to rescale the chart but when I rescale it and then this happens
what should I do?
here is the VBA code to rescale the chart
VBA Code:
Sub EscalaAtivos1()
Dim nome As String
Application.ScreenUpdating = False
ActiveSheet.ChartObjects("Chart 5").Activate
ActiveChart.Axes(xlValue, 1).Select
With ActiveChart.Axes(xlValue, 1)
.Crosses = xlMinimum - 0.1
.MinimumScale = Range("I6").Value
.MaximumScale = Range("H6").Value
.MajorUnit = Range("J4")
.ReversePlotOrder = False
.ScaleType = xlLinear
.DisplayUnit = xlNone
End With
ActiveChart.Axes(xlCategory, 1).Select
With ActiveChart.Axes(xlCategory, 1)
'.Crosses = xlMinimum
.CategoryType = xlTimeScale
.MajorUnit = Range("J6").Value
'.BaseUnitIsAuto = True
.MinimumScale = Range("H4").Value
.MaximumScale = Range("I4").Value
.TickLabels.Orientation = 45
.ReversePlotOrder = False
end sub