If you do it on the server, you can use practically any language to generate dynamic images - though you'd probably do gif or jpeg as the X-windows bitmap file format is rather inefficient.

But when you try to do the imaging on the client, your choices are rather limited - unless you're prepared to use the JVM or .Net, neither of which I've had too much on the client side.