Here's a bit of Javascript which I wrote. I love the colours, but it took me a while to figure out how to update the graphic without reloading the entire page.

At first I thought I needed to learn both AJAX and PHP which is one way of doing it but this is inefficient.

It turns out that updating the client side innerHTML parameter will do this without making another call to the server.

Check out the code if you're interested in how this works.