edited chart_updatevals php example