fixed chart not rendering

because you added the script before the main chunk of htme, the <div
id=chart> had not been instantiated as a dom element so the graph
couldn't be placed