Changes made to queries in Chart.php