1
Guys, I’m trying to put together a Payback chart, but it’s really weird. I used the following code (summary of what influences):
Public vetor_x(121) As Integer
Public vetor_y(121) As Double
Private Sub grafico_payback()
For i = 0 To 120 Step 1
vetor_x(i) = i
vetor_y(i) = - investimento + (economia mensal * i)
Next
End Sub
The idea is: in month zero, there is no economy, only investment (negative). From month 1, this expense will decrease as the (positive) economy is credited month by month, but as you can see in the photo, it did not work very well.
I need to adjust these values of the X axis (to go from 0 - 120) and understand why the program plotted two lines (the bottom one is right, Payback in about 39 months)
Taking advantage, if someone also knows how to emphasize the horizontal line "y=0" and format the values of "y" to appear in "R$ #.###,00", also I grade a lot Thank you!
Hello Leo, I recommend to post your entire code to give us a context of what has already been accomplished. Taking advantage, is VB.NET, right?
– Bruno Soares
Sorry, I’m quite amateur, but I also can’t paste the entire code by exceeding the number of characters, as I do? ps: yes, it’s VB.NET Framework
– Leo Moraes