JS code much better. AJAX data passing for all charts ~75% done