changed chart data load to json

changed chart data load to json and ajax instead of just php to keep the
same framework that will be used for other dynamic charts