Option Explicit
Sub Main
Call DisegnaGraficoIncrRitMax
End Sub
Sub DisegnaGraficoIncrRitMax
Dim x,y,k
Dim nValoreMaxX,nValoreMaxY,nValoreMinX
Dim nStepX,nStepY
Dim nUpperVetIncrRit
Dim aIdEstrIncrRitMax
Dim aElencoRit
Dim mInizio
Dim aElencoIncrRitMax
Dim aRitardiAllIncremento
mInizio = EstrazioneIni
aElencoRit = Array(79,75,12,100,550,440,62,31,39,27,259,132,77,186,167,244,38,220,217,45,18,362,310,90,39,53,68,70,194,211,21,132,4,253,300,447,99,34,17,29,233,202,167,90,137,307,6,161,3,238,52,245,20,35,53,147,30,150,104,170,32,492,40,142,94,303,155,143,63,99,5,13,15,13,40,13 )
aIdEstrIncrRitMax = Array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75)
'aElencoIncrRitMax = Array(-4,-63,88,450,-110,-378,-31,8,-12,232,-127,-55,109,-19,77,-206,182,-3,-172,-27,344,-52,-220,-51,14,15,2,124,17,-190,111,-128,249,47,147,-348,-65,-17,12,204,-31,-35,-77,47,170,-301,155,-158,235,-186,193,-225,15,18,94,-117,120,-46,66,-138,460,-452,102,-48,209,-148,-12,-80,36,-94,8,2,-2,27,-27)
aElencoIncrRitMax = Array(4,63,88,450,110,378,31,8,12,232,127,55,109,19,77,206,182,3,172,27,344,52,220,51,14,15,2,124,17,190,111,128,249,47,147,348,65,17,12,204,31,35,77,47,170,301,155,158,235,186,193,225,15,18,94,117,120,46,66,138,460,452,102,48,209,148,12,80,36,94,8,2,2,27,27)
aRitardiAllIncremento = Array(79,75,12,100,550,440,62,31,39,27,259,132,77,186,167,244,38,220,217,45,18,362,310,90,39,53,68,70,194,211,21,132,4,253,300,447,99,34,17,29,233,202,167,90,137,307,6,161,3,238,52,245,20,35,53,147,30,150,104,170,32,492,40,142,94,303,155,143,63,99,5,13,15,13,40,13 )
nValoreMinX = MinimoV(aIdEstrIncrRitMax,1)
nValoreMaxX = aIdEstrIncrRitMax(UBound(aIdEstrIncrRitMax))
nValoreMaxY = MassimoV(aElencoRit,1)
nStepX =(nValoreMaxX -(mInizio - 1)) '\10
nStepY = nValoreMaxY '\10
Call PreparaGrafico("BA 1-2-3",nValoreMinX,nValoreMaxX,0,nValoreMaxY,nStepX,nStepY)
nUpperVetIncrRit = UBound(aElencoIncrRitMax)
ReDim aV(nUpperVetIncrRit - 1,2)
For k = 1 To nUpperVetIncrRit
x = aIdEstrIncrRitMax(k)
y = aElencoIncrRitMax(k)
aV(k - 1,1) = x
aV(k - 1,2) = y
Next
Call DisegnaLineaGrafico(aV,vbRed,"IncrRitMax")
ReDim aV(nUpperVetIncrRit - 1,2)
For k = 1 To nUpperVetIncrRit
x = aIdEstrIncrRitMax(k)
y = aRitardiAllIncremento(k)
aV(k - 1,1) = x
aV(k - 1,2) = y
Next
'Call DisegnaLineaGrafico(aV,vbBlue,"RitMax")
Call InserisciGrafico
End Sub