Finding the y-axis for points on a line graph made with PHP's imageline()

Notsobstype

New Member
I'm making a line graph with PHP using imagecreate() and imageline(). Im' trying to figure out how to do the calculation to find the y-axis for each point on the graph.Here are a few values that would go in the graph:\[code\]$values[jan] = .84215;$values[feb] = 1.57294;$values[mar] = 3.75429;\[/code\]Here is an example of the line graph. The x-axis labels are positioned at the vertical middle of the x-axis lines. The gap between the x-axis lines is 25px.How would you do the calculation to find the y-axis for the values in the array above?\[code\]5.004.754.504.254.003.753.503.253.002.752.502.252.001.751.501.251.000.750.500.250.00 Jan Feb Mar apr may jun jul aug sep oct nov dec\[/code\]
 
Back
Top