Home › Forums › JavaScript › Line graph – joining the dots (responsive) › Reply To: Line graph – joining the dots (responsive)
September 4, 2014 at 11:38 am
#181691
Soronbe
Participant
Half the height of the line is a nice estimate (which you used). I think you’d need to use cos(angle) and sin(angle) multiplied with half the width of the lines for the left and top respectively. I havn’t tested yet though. In my example the lines had a width of 1 px so I just neglected doing so.