<?php
require_once('fetch.php');
if($_GET['type'] == 'inclinstionPieChart'){
    $data = fetch_data_chart();
    echo json_encode($data);
}
if($_GET['type'] == 'fetchColor'){
    $data = fetch_colors();
    echo json_encode($data);
}
if($_GET['type'] == 'ratingBarChartQ1'){
    $data = fetch_data_bar_chart('Q1',"#f4511e");
    echo json_encode($data);
}
if($_GET['type'] == 'ratingBarChartQ2'){
    $data = fetch_data_bar_chart('Q2',"#1A73E8");
    echo json_encode($data);
}
if($_GET['type'] == 'ratingBarChartQ3'){
    $data = fetch_data_bar_chart('Q3',"#AFE1AF");
    echo json_encode($data);
}
?>