JavaScript charts in PHP and MySQL