I am developing a pie chart in which there will be lines that move around it (for example, a clock, but not necessarily so ordinary). The lines will actually be vectors, so they will have an angle and magnitude. I do this with images (unless someone has a better idea), and I resize the image to represent the value, and I use CSS transforms to change the angle. My problem is that I never know how to position the image so that it looks like the line comes from the center of the circle. Right now I am using the top and left CSS properties to place the image. Does anyone have any ideas for developing an algorithm to support a “centered” image or have an idea for a better way to do this? I would use HTML and the canvas tag, but I need to support IE8.
source
share