Well, to be strictly accurate, it’s more a case of “Testing 1, 2, ... 1500”. If at this stage you want to see if the code so far is working, put the next code snippet in the btnDraw’s Click event and then click the button.
Private Sub btnDraw_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDraw.Click
' The various actions are now split into separate procedures to make
' the project more modular
' 1. Get the data
GetData()
' 2. Get a Graphics object to use for the drawing methods
g = GetGraphics()
' 3. Draw the Vertical Axis
DrawVerticalAxis(g)
' : More code to come ....
' n. Assign the bitmap with the vertical axis drawn to the PictureBox
PBBarChart.Image = bmap
End Sub
As you will see, the Tick Marks now range from 100 to 1500, reflecting the current highest sales figure of 1472 (Turkey).
You can tweak these values, run the project again and you will see that the vertical axis adjusts accordingly.