How to format graphical axes in visual studio

1

People, so trying to put together a payback chart, but it's very strange. 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). As of month 1, this spending is decreasing 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 from the X axis (to go from 0 - 120) and understand why the program plotted two lines (the bottom is right, payback in approximately 39 months)

>

If someone also knows how to emphasize the horizontal line "y = 0" and format the values of "y" to appear in "$ #. ###, 00", I am also very grateful Thanks!

    
asked by anonymous 20.09.2018 / 00:14

0 answers