Let's take a set of numbers and calculate the percentage that each number represents of the whole.

The height of the Canvas needs to be more than 100% of the height of the graph/chart. This Canvas is 400px high so let's use 300px as the number that represents 100% of the chart/graph height.