<?php
session_start();
if(!isset($_SESSION['user'])){
    header('location:index.php');
}

include('config.php');
//clearstatcache();
$user = $_SESSION['user'];
$user_type = $_SESSION['user_type'];
$dealer_code=$_SESSION['dealer_code'];
/*NCH Sar start*/
$f_con="";

$regionF=0;
$zonal_arrF = array(1=>"North','South','East','West','Central",2=>"North",3=>"South",4=>"East",5=>"West",6=>"Central");
$Region_arrF=array();
if($user_type>=1 and $user_type<=6)
{
	$f_con="zone in ('".$zonal_arrF[$user_type]."') and";
	
}
if($user_type>=7 and $user_type<=23)
{
	if($user_type>=7 and $user_type<=9){ $zoneT=6;    }
	if($user_type>=10 and $user_type<=12){ $zoneT=2;    }
	if($user_type>=13 and $user_type<=15){ $zoneT=4;  }
	if($user_type>=16 and $user_type<=19){ $zoneT=5;  }
	if($user_type>=20 and $user_type<=23){ $zoneT=3;   }
	$f_con="zone in ('".$zonal_arrF[$zoneT]."') and";
	
	
}

if($user_type>=999)
{
	
	$f_con="zone in ('".$_SESSION['zone']."') and";
	
	
}
/*NCH Sar end*/
//$user_type2 = $_SESSION['user_type2'];
$comment_arr = array();
$findme   = '.';
$pos = strpos($user, $findme);

if($pos === false)
{
    $modify_username3 = $user;
}
else
{
    $len = strlen($user);
    $modify_username2 = strpos($user,".");
    $modify_username3 =substr($user, 0,$modify_username2);
}

?>
<script>
var user = '<?php echo $_SESSION['user'] ; ?>';
var userType = '<?php echo $_SESSION['user_type'] ; ?>';

userType = parseInt(userType);


/*var userType2 = '<?php echo $_SESSION['user_type2'] ; ?>';*/
var userName = '<?php echo $modify_username3 ; ?>';

//console.log(user);
//console.log(userType);
</script>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="Content-Language" content="en">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Cache-Control" content="Public, Private" />
    <title>HYUNDAI | Dashboard</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, shrink-to-fit=no" />
    <meta name="description" content="This is an example dashboard created using build-in elements and components.">
    <meta name="msapplication-tap-highlight" content="no">
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
    <link href="assets/css/main.css" rel="stylesheet">
    <link href="assets/css/dataTables.bootstrap4.min.css" rel="stylesheet">
    <link href="assets/css/buttons.dataTables.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-multiselect/0.9.15/css/bootstrap-multiselect.css">
    <link rel="stylesheet" href="assets/js/select2.min.css">
    <script src="https://cdn.jsdelivr.net/npm/pptxgenjs@3.3.1/dist/pptxgen.bundle.js"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
    <script type="text/javascript" src="assets/js/jquery.min.js"></script>
    <style>
    table.table.table-striped.table-bordered.no-footer.text-center.display.dataTable {
        width: 100% !important;
    }

    .customback {
        top: 150px !important;
        right: 32px !important;
    }

    .cbh {
        text-align: left;
        font-size: 10px;
        font-weight: bold;
        padding-left: 20px;
    }

    .pr {
        padding-right: 0px !important;
    }

    .app-theme-white.app-container {
        background-color: gainsboro !important;
        /* background-image: url("assets/images/bg.jpg"); */
        background-size: auto;
    }

    .card {
        border-radius: 7px !important;
    }

    .highcharts-container {
        text-align: center !important;
        width: auto !important;
        margin: 0 auto !important;
    }

    .font {
        font-weight: 500;
    }

    .div-head {
        background-color: #003266;
        color: #fff;
        text-align: center;
        margin: 0px !important;
        border-radius: 5px;
        height: 50px;

    }

    #townclass {
        white-space: pre;
    }

    .vertical-nav-menu li a:hover {
        color: #FFFFFF !important;
        font-weight: normal !important;
        background-color: #003e80 !important;
        box-shadow: none !important;
        cursor: pointer;

    }

    .vertical-nav-menu li a.tbt:hover {
        color: #000000 !important;
        font-weight: normal !important;
        background-color: #DEEAF6 !important;
        box-shadow: none !important;
        cursor: pointer;

    }

    /* .vertical-nav-menu li a.tbt.active.show {
            color: #000000 !important;
            font-weight: normal !important;
            background-color:#DEEAF6 !important;
            box-shadow: none !important;
            cursor: pointer;
} */
    /* ul.multiselect-container.dropdown-menu.show
        {
            background-color: aliceblue !important;
        } */
    .vertical-nav-menu li a {
        font-size: 0.8rem !important;
    }

    .openbtnShow {
        color: #003266 !important;
        font-weight: bold;
    }

    .vertical-nav-menu li a {
        display: block;
        line-height: 2.4rem;
        height: 2.4rem;
        /* padding: 0 1.5rem 0 45px; */
        position: relative;
        border-radius: 0.25rem;
        color: #343a40;
        white-space: nowrap;
        transition: all .2s;
        /* margin: 0.1rem 0; */
    }

    .pikachu a[aria-expanded="true"] {
        background-color: #003e80;
        color: #FFFFFF !important;
    }

    .pikachu a[aria-expanded="false"] {
        background-color: #FFFFFF !important;
        color: #000000 !important;
    }

    .pikachu a.tbt[aria-expanded="true"] {
        background-color: #DEEAF6;
        color: #000000 !important;
    }

    .pikachu a.tbt[aria-expanded="false"] {
        background-color: #FFFFFF !important;
        color: #000000 !important;
    }

    .nav-item a.active {
        background-color: #003e80 !important;
        color: #FFFFFF !important;
    }

    .nav-item a {
        background-color: none !important;
        color: #000000 !important;
    }

    /* a.ash:active {
            background-color:red; 
            color: #FFF; 
            text-decoration:none; 
            font-weight:normal; 
        } */
    .vertical-nav-menu ul {
        padding: 0 0 0 0 !important;
    }

    .popup-btn a {
        letter-spacing: 3px;
        width: 150px;
        font-size: 15px;
        top: 10px;
        position: absolute;
        right: 325px;
        z-index: 1000;
        /* transform: rotate(-90deg); */
        background-color: #003266 !important;
        padding: 3px 40px 24px 40px;
        height: 0px;
        background-color: #000;
        color: #fff;
        border-radius: 10px;
    }

    .popup-btn a:hover {
        text-decoration: none;
        color: #fff;
    }

    .sidebar2 {
        height: 700px;
        width: 0;
        position: fixed;
        z-index: 99999;
        top: 0px;
        right: 0;
        background-color: #ffffff;
        overflow-x: hidden;
        transition: 0.5s;

    }

    .sidebar2 .closebtn {
        position: relative;
        top: 0px;
        left: 180px;
        font-size: 24px;
        margin-left: 50px;
    }

    .sidebar2 a {
        padding: 8px 8px 8px 32px;
        text-decoration: none;
        font-size: 25px;
        color: #245798;
        display: block;
        transition: 0.3s;
    }

    .fixed-sidebar .app-main .app-main__outer {
        z-index: 9;
        padding-left: 0px !important;
    }



    .trendsH {
        height: 25px;
    }

    .span-blue {
        color: #e20000;
    }

    .hidden {
        display: none;
    }

    .show-d {
        display: block;
    }

    .select2-container {
        width: 300px !important;
    }

    fieldset {
        border: 1px solid #ddd !important;
        align-content: center !important;
        margin: 0 !important;
        xmin-width: 0 !important;
        height: auto !important;
        position: relative !important;
        border-radius: 4px !important;
        border: 1px solid black !important;
    }



    legend {
        font-size: 14px !important;
        text-align: left !important;
        margin-bottom: 0px !important;
        width: auto !important;
        border-radius: 4px !important;
        padding: 5px 5px 5px 10px !important;
    }

    ul.multiselect-container.dropdown-menu.show {
        padding: 0 !important;
        border: none !important;
        min-width: fit-content !important;
    }

    .openbtn {
        font-size: 20px;
        cursor: pointer;
        background-color: #fafbfc;
        color: black;
        border: none;
    }

    .sidebar {
        height: 620px;
        width: 0;
        position: fixed;
        z-index: 999;
        top: 46px;
        left: 0;
        background-color: #ffffff;
        overflow-x: hidden;
        transition: 0.5s;

    }

    #main {
        transition: 0.5s;
    }

    .sidebar .closebtn {
        position: absolute;
        top: 0;
        right: 25px;
        font-size: 24px;
        margin-left: 50px;
    }

    .sidebar a {
        padding: 8px 8px 8px 32px;
        text-decoration: none;
        font-size: 25px;
        color: #245798;
        display: block;
        transition: 0.3s;
    }

    label {
        font-size: 12px;
    }

    .dataTables_scrollHeadInner {
        width: auto !important;
    }

    @media screen and (min-width: 1093px) {
        #chart_voc {
            padding: 1px 0px 28px 0px !important;
        }
    }

    @media screen and (max-width: 498px) {
        .fixed-sidebar .app-main .app-main__outer {
            z-index: 9;
            padding-left: 0px !important;
        }

        .trendsH {
            height: auto !important;
        }

        #cloudheaderSize {
            height: auto !important;
        }

        .proGress {
            margin: 84px 41px 0px 11px !important;
        }

        #baseOverall {
            float: none !important;
        }

        .mar7 {
            padding-left: 15px !important;
        }

        .nps {
            padding-right: 0px !important;
            padding-left: 0px !important;
        }

        .nps2 {
            padding-right: 15px !important;
            padding-left: 15px !important;
        }

        #footerG {
            margin-top: 0px !important;
        }

        .padR {
            padding-right: 0px !important;
            margin-bottom: 5px !important;
        }

        #target {
            margin-top: 0% !important;
        }

        .pad8 {
            padding-left: 15px !important;
            padding-right: 15px !important;
        }

        .pX {
            padding-left: 0px !important;
            padding-right: 0px !important;
        }

        .pXL {
            padding-left: 0px !important;
        }

        .tableP {
            padding-top: 0px !important;
            padding-right: 15px !important;
        }

        .mar8 {
            padding-left: 15px !important;
            padding-right: 15px !important;
        }

        .rectangle {
            margin-left: 102px !important;
        }

        .mobile {
            display: block !important;
        }

        .spaces {
            margin-top: 20px;
        }

        .bars {
            display: none !important;
        }

        .nav-mob {
            display: block !important;
        }

        .nav-mob1 {
            display: none !important;
        }

        #chart_oneM {
            display: block !important;
        }

        #chart_one {
            display: none !important;
        }
    }

    #chart_oneM {
        display: none;
    }

    #chart_one {
        display: block;
    }

    @media (min-width: 992px) and (max-width : 1200px) {
        .nav-mob2 {
            display: none;
        }
    }

    @media (min-width: 992px) and (max-width : 1242px) {
        .snallNav {
            display: contents !important;
        }

        #queryNps {
            font-size: 11px !important;
        }
    }

    .splash {
        position: absolute !important;
        width: 100% !important;
        height: 100% !important;
        background: white;
        left: 0 !important;
        top: 0 !important;
        opacity: 0.9 !important;
        z-index: 999999999999;
    }

    .splash-title {
        text-align: center;
        max-width: 500px;
        padding: 170px;
        margin-top: 9%;
        margin-left: auto;
        margin-bottom: auto;
        margin-right: auto;
    }

    .spinner {
        border: 10px solid #f3f3f3;
        border-radius: 50%;
        border-top: 10px solid #003266;
        width: 90px;
        height: 90px;
        -webkit-animation: spin 2s linear infinite;
        /* Safari */
        animation: spin 2s linear infinite;
    }

    /* Safari */
    @-webkit-keyframes spin {
        0% {
            -webkit-transform: rotate(0deg);
        }

        100% {
            -webkit-transform: rotate(360deg);
        }
    }

    @keyframes spin {
        0% {
            transform: rotate(0deg);
        }

        100% {
            transform: rotate(360deg);
        }
    }

    /*spinner chart starts*/

    .mt-100 {
        margin-top: 200px
    }

    .padR {
        margin-bottom: 5px !important;
    }



    .mar7 {
        padding-left: 0px;
    }

    .mar8 {
        padding-left: 0px;
        padding-right: 0px;
    }

    .mobile {
        display: none;
    }

    .pad8 {
        padding: 0px;
    }

    .rectangle {
        height: 65px;
        width: 120px;
        background-color: #3f6ad83b;
        border-radius: 20px;
        margin-left: 13px;
        padding: 20px;
        font-weight: bold;
        font-size: 14px;
    }

    .btn-outline-primary {
        color: black !important;
    }

    .btn-outline-primary:hover {
        color: white !important;
        border: 1px solid #003e80 !important;
        background-color: #003e80 !important;
    }

    .btn1:focus {
        background-color: red !important;
    }

    .btn2:focus {
        background-color: red !important;
    }

    .btn3:focus {
        background-color: red !important;
    }

    /*spinner chart ends*/
    .multiselect-container {
        transform: translate3d(0px, 0px, 0px) !important;
        MAX-HEIGHT: 250px;
        overflow-y: auto;
        width: 250px;
    }

    .multiselect-container>li>a>label {
        padding: 3px 10px 3px 10px !important;
    }

    .vertical-nav-menu ul:before {
        background: white !important;
        content: none !important;
    }

    button.multiselect.dropdown-toggle.btn.btn-default {
        margin-top: -5px !important;
        border: 1px solid grey !important;
        width: 232px !important;
        margin-left: 5px !important;
        margin-bottom: 5px !important;
        /* background-color: aliceblue !important; */
        text-align: left !important;
    }

    .vertical-nav-menu li a {
        white-space: normal;
    }

    /* .multiselect-container>li
        {
            display: table !important;
        }*/
    #age>ul.multiselect-container.dropdown-menu.show {
        overflow-y: none !important;
    }

    ol {
        line-height: 1.8rem;
        color: white !important;
    }

    .mask {
        background-color: green !important;
    }

    .select2-container--default .select2-selection--single {
        background-color: aliceblue !important;
    }

    .btnnss {
        background-color: #E00000;
    }

    a.fancybox>.btn {
        background: #3f63ff;
        color: #FFF;
        font-size: 14px;
        padding: 2px 5px;
    }

    .modal-dialog {
        max-width: 730px;
    }

    .wrap-modal-slider {
        padding: 0 30px;
        opacity: 0;
        transition: all 0.3s;
    }

    .wrap-modal-slider.open {
        opacity: 1;
    }

    .slick-prev:before,
    .slick-next:before {
        color: red;
    }

    a.fancybox>.btn {
        background: #3f63ff;
        color: #FFF;
        font-size: 14px;
        padding: 2px 5px;
    }

    #myModal>.modal-dialog {
        width: 90% !important;
        min-width: 90% !important;
    }

    img.imgFrst {
        width: 90% !important;
        margin: 0 auto !important;
        display: block !important;
    }

    #fancybox-close {
        right: -30px !important;
    }

    #fancybox-wrap {
        width: 90% !important;

        height: auto;
        top: 0px !important;
        left: 5% !important;
    }

    #fancybox-content {
        border-width: 10px !important;
        width: 100% !important;
        height: 550px !important;
    }

    .btn-outline-primary.voc,
    .btn-outline-primary.nps {
        color: #fff !important;
        background-color: #e20000 !important;
        border-color: #e20000 !important;
    }

    img.logClass {
        width: 25px;
    }

    h6 {
        font-family: 'Roboto', sans-serif !important;
    }

    .progress {
        width: 100px;
        height: 100px !important;
        float: left;
        line-height: 100px;
        background: none;
        margin: 10px 10px 0px 43px;
        box-shadow: none;
        position: relative
    }

    .progress:after {
        content: "";
        width: 100%;
        height: 100%;
        border-radius: 50%;
        border: 12px solid #f1f4f6;
        ;
        position: absolute;
        top: 0;
        left: 0
    }

    .progress>span {
        width: 50%;
        height: 100%;
        overflow: hidden;
        position: absolute;
        top: 0;
        z-index: 1
    }

    .progress .progress-left {
        left: 0
    }

    .progress .progress-bar {
        width: 100%;
        height: 100%;
        background: none;
        border-width: 12px;
        border-style: solid;
        position: absolute;
        top: 0
    }

    .progress .progress-left .progress-bar {
        left: 100%;
        border-top-right-radius: 80px;
        border-bottom-right-radius: 80px;
        border-left: 0;
        -webkit-transform-origin: center left;
        transform-origin: center left
    }

    .progress .progress-right {
        right: 0
    }

    .progress .progress-right .progress-bar {
        left: -100%;
        border-top-left-radius: 80px;
        border-bottom-left-radius: 80px;
        border-right: 0;
        -webkit-transform-origin: center right;
        transform-origin: center right;
        animation: loading-1 1.8s linear forwards
    }

    .progress .progress-value {
        width: 90%;
        height: 90%;
        border-radius: 50%;
        background: transparent;
        font-size: 18px;
        color: black;
        line-height: 85px;
        text-align: center;
        position: absolute;
        top: 5%;
        left: 5%
    }

    .progress.blue .progress-bar {
        border-color: #3f6ad8 !important;
    }

    .progress.blue .progress-left .progress-bar {
        animation: loading-2 1.5s linear forwards 1.8s
    }

    .progress.yellow .progress-bar {
        border-color: #fdba04
    }

    .progress.yellow .progress-right .progress-bar {
        animation: loading-3 1.8s linear forwards
    }

    .progress.yellow .progress-left .progress-bar {
        animation: none
    }

    .card-header>.nav .nav-link::before {
        background: none;
    }

    /* .mar0
        {
            margin-left:-10px;
            margin-right:-10px;
        } */
    @media (min-width: 1455px) {
        .zoomX {
            zoom: 100%;
        }
    }

    @media (max-width: 1280px) {
        .zoomX {
            zoom: 90%;
        }

        .app-theme-white.app-container {
            height: 700px !important;
        }

        .customW {
            flex: 0 0 100%;
            max-width: 96%;
        }
    }

    .switchbtn {
        padding-left: 10px;
        display: inline-flex;

    }

    .switch {
        margin-top: 6px;
        margin-left: 5px;
        margin-right: 5px
    }

    .switch {
        position: relative;
        display: inline-block;
        width: 50px;
        height: 26px;
    }

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }
.srow {
    display: flex;
}
h6.ppdCLass {
    word-wrap: normal !important;
}
.ftext {
    font-size: 12px;
    font-weight: 600;
    margin-left: 20px;
    margin-bottom: 10px;
}
.ftext p {
    margin: 0px;
}
    .slider {
        position: absolute;
        cursor: pointer;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: #ccc;
        -webkit-transition: .4s;
        transition: .4s;
    }

    .slider:before {
        position: absolute;
        content: "";
        height: 22px;
        width: 20px;
        left: 3px;
        bottom: 3px;
        background-color: white;
        -webkit-transition: .4s;
        transition: .4s;
    }

    input:checked+.slider {
        background-color: #2196F3;
    }

    input:focus+.slider {
        box-shadow: 0 0 1px #2196F3;
    }

    input:checked+.slider:before {
        -webkit-transform: translateX(26px);
        -ms-transform: translateX(26px);
        transform: translateX(26px);
    }

    /* Rounded sliders */
    .slider.round {
        border-radius: 34px;
    }

    .slider.round:before {
        border-radius: 50%;
    }

    .tt {
        margin-top: 8px;
        font-weight: bold;

    }

    .hnH {
        width: 50% !important;
        max-width: 50% !important;
        flex: 0 0 50% !important;
    }

    .expD {
        width: 100% !important;
        max-width: 100% !important;
        flex: 100% !important;
    }
	span.SAS {
    display: block;
    font-size: 8px;
}
    </style>
    <link type="text/css" rel="stylesheet" href="assets/css/fancybox.css" />
</head>

<body class="zoomX">
    <div class="app-container app-theme-white body-tN-shadow fixed-sidebar fixed-header" id="app-containerX"
        onclick="closeF()">
        <!--Big Screen-->
        <div class="app-header header-shadow" style="height:30px">
            <div class="app-header__logo" style="background-color:white;margin-left:-15px;width:500px">
                <button class="openbtn" id="openbtn" onclick="navbar()"
                    style="background-color:white;margin-top:15px">☰</button>
                <img src="assets/images/Hyundai2.png"
                    style="position: relative;;margin-top:20px;margin-left:20px;width:150px;height:20px;">
                <img src="assets/images/nlogo.png"
                    style="position: relative;margin-top:15px;margin-left:20px;width:200px;height:40px;">
                <!-- <h3 style="font-size: 24px;color:#003e80 !important;text-align:center !important;margin-top:22px;margin-left:30px"><b>HYUNDAI – DASHBOARD</b></h3> -->
                <div class="logo-src">
                    <!-- <img src="assets/images/hyundai-logo.png" style="position: relative;margin-top:20px;margin-left:20px"> -->
                </div>
                <!-- <div class="header__pane"></div> -->
            </div>
            <!--Mobile -->
            <div class="app-header__mobile-menu">

            </div>
            <div class="app-header__menu">

            </div>
            <!--Mobile -->
            <div class="app-header__content" style="background-color:white">
                <div class="app-header-right">

                    <!--<h3 style="font-size: 24px;color:#3F63FF !important;text-align:center !important;font-family: 'Roboto', sans-serif;margin-top:22px"><b>AVI – DASHBOARD</b></h3>-->
                </div>
                <div class="app-header-right">

                    <!-- <a href="assets/readme/img1.png" class="fancybox" rel="fancyboxgallery" tabindex="225" style="margin-top:15px">
                <div class="btn" id="btnread" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="Read Me" style="height: 32px;">Read Me</div></a>
                    <a href="assets/readme/img2.png" class="fancybox" rel="fancyboxgallery" tabindex="225"></a>
                    <a href="assets/readme/img3.png" class="fancybox" rel="fancyboxgallery" tabindex="225"></a>
                    <a href="assets/readme/img4.png" class="fancybox" rel="fancyboxgallery" tabindex="225"></a>
                    <a href="assets/readme/img5.png" class="fancybox" rel="fancyboxgallery" tabindex="225"></a>
                    <a href="assets/readme/img6.png" class="fancybox" rel="fancyboxgallery" tabindex="225"></a>
                    <a href="assets/readme/img7.png" class="fancybox" rel="fancyboxgallery" tabindex="225"></a>
                    <a href="assets/readme/img8.png" class="fancybox" rel="fancyboxgallery" tabindex="225"></a>
                    <a href="assets/readme/img9.png" class="fancybox" rel="fancyboxgallery" tabindex="225"></a>
                    <a href="assets/readme/img10.png" class="fancybox" rel="fancyboxgallery" tabindex="225"></a>
                    <a href="assets/readme/img11.png" class="fancybox" rel="fancyboxgallery" tabindex="225"></a>
                    <a href="assets/readme/img12.png" class="fancybox" rel="fancyboxgallery" tabindex="225"></a>
                    <a href="assets/readme/img13.png" class="fancybox" rel="fancyboxgallery" tabindex="225"></a>
                    <a href="assets/readme/img14.png" class="fancybox" rel="fancyboxgallery" tabindex="225"></a>
                    <a href="assets/readme/img15.png" class="fancybox" rel="fancyboxgallery" tabindex="225"></a>
                    <a href="assets/readme/img16.png" class="fancybox" rel="fancyboxgallery" tabindex="225"></a>
                    <a href="assets/readme/img17.png" class="fancybox" rel="fancyboxgallery" tabindex="225"></a>
                    <a href="assets/readme/img18.png" class="fancybox" rel="fancyboxgallery" tabindex="225"></a> -->

                    <button type="button" class="btn-transition btn btn-outline-primary btn-sm vocnot" id="export-pdf"
                        data-toggle="tooltip" data-placement="bottom" title="" data-original-title="Export PDF"
                        style="height:35px;width:35px;margin-top:15px">
                        <img src="assets/images/pdf.png" height="25" width="20" />
                    </button>
                    <button type="button" class="btn-transition btn btn-outline-primary btn-sm vocnot"
                        onclick="exportPpt();" data-toggle="tooltip" data-placement="bottom" title=""
                        data-original-title="Export PPT" style="height:35px;width:35px;margin-top:15px">
                        <img src="assets/images/ppt.png" height="25" width="20" />
                    </button>
                    <button type="button" id="Overall_Excel" class="btn-transition btn btn-outline-primary btn-sm vocnot"
                        onclick="exportExcel(this.id);" data-toggle="tooltip" data-placement="bottom" title=""
                        data-original-title="Export Excel" style="height:35px;width:35px;margin-top:15px">
                        <img src="assets/images/excel.png" height="25" width="20" />
                    </button>
                    <?php
                        // if($user == 'admin'){
                        //     echo '<button type="button" class="btn-transition btn btn-outline-primary btn-sm" data-toggle="modal" data-target=".bd-example-modal-sm" style="height:45px" ><i class="fa fa-fw" aria-hidden="true" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="Update Database"></i></button>';
                        // }
                    ?>
                    <button type="button" class="btn-transition btn btn-outline-primary btn-sm" onclick="logout();"
                        data-toggle="tooltip" data-placement="bottom" title="" data-original-title="Logout"
                        style="height:35px;width:35px;margin-top:15px">
                        <img src="assets/images/logout.png" height="20" width="20" />
                    </button>
                    <!-- <img class="img-fluid" src="assets/images/logo.png" alt="" width="25px" style="margin-top:15px;margin-left:5px"> -->
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-lg-4">
                <div id="mySidebar" class="sidebar">
                    <?php
                    include("tab.php");
                    ?>
                    <!-- <h6 class="mt-5" style="font-size: 0.8rem;margin-left:10px">Scores are reported at the base greater than or equal to 45</h6> -->

                </div>
            </div>
        </div>


        <!--Main Body -->
        <div class="app-main" id="main">
            <div class="splash">
                <div class="splash-title">
                    <div class="spinner">

                    </div>
                </div>
            </div>
            <div class="app-main__outer">
                <div class="app-main__inner">
                    <!-- <div class="card-body" style="margin-bottom:-20px;border:2px solid black"> -->
                    <div class="tab-content">
                        <div class="row" style="margin-top:-40px">
                            <div class="col-lg-12 pl-0">
                                <div class="card card-shadow-danger mb-2">
                                    <div class="row">
                                        <div class="col-md-3" id="activetabname">
                                            <h6 class="ml-2 mt-2"><b style="font-weight: 500;color:#003266">Overall
                                                    Performance</b></h6>
                                        </div>
                                        <div class="col-md-7" style="text-align:end" id="chart_convert">
                                        </div>
                                        <div class="col-md-2" id="overallPBase">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-lg-12 pl-0">
                                <div class="card card-shadow-danger mb-2">
                                    <div class="row">
                                        <div class="col-md-12">
                                            <textarea class="paraX hidden"
                                                style="height:auto;max-width:200px;word-wrap:break-word;">Filters:All Selected</textarea>
                                            <p class="ml-2 mt-2 paraY" style="width:1100px; height:auto"><b>Filters:All
                                                    Selected</b></p>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>





                        <!-------------------------------------------------- Snapshot Start -------------------------------------------->
                        <div class="tab-pane active" id="tab-eg7-0" role="tabpanel" style="margin-left:-15px">
                            <?php //include "preference.php"; ?>
                            <!-- <div class="tab-pane active" id="tab-eg8-0" role="tabpanel">
                                    
                                </div>-->
                            <div class="card-header">
                                <ul class="nav nav-justified ml-2" id="subtabs1">
                                </ul>
                            </div>
                            <div class="tab-content">
                                <div class="tab-pane active" id="tab-eg8-0" role="tabpanel">
                                    <?php include "preference.php"; ?>
                                </div>
                                <div class="tab-pane" id="tab-eg8-1" role="tabpanel">
                                    <?php include "zonal.php"; ?>
                                </div>
                                <div class="tab-pane" id="tab-eg8-17" role="tabpanel">
                                    <?php include "regional.php"; ?>
                                </div>
                            </div>
                        </div>

                        <div class="tab-pane" id="tab-eg7-1" role="tabpanel">
                            
                            <div class="card-header" style="margin-left:-15px">
                                    <ul class="nav nav-justified ml-2" id="subtabs2">
                                    </ul>
                                </div>
                            <div class="tab-content">
                                    <div class="tab-pane active" id="tab-eg8-2" role="tabpanel">
                                        <?php include "factor.php"; ?>
                                    </div>
                                    <div class="tab-pane" id="tab-eg8-3" role="tabpanel">
                                        <?php include "factorT.php"; ?>
                                    </div>
                                    <!-- <div class="tab-pane" id="tab-eg8-4" role="tabpanel">
                                        <?php //include "vehical.php"; ?>
                                    </div> -->
                                </div>

                        </div>

                        <!-- <div class="tab-pane" id="tab-eg7-2" role="tabpanel">
                            <?php //include "factor_deep.php"; ?>
                            </div> -->

                        <div class="tab-pane" id="tab-eg7-2" role="tabpanel">
                            <?php //include "dizitization.php"; ?>
                            <div class="card-header" style="margin-left:-15px">
                                <ul class="nav nav-justified ml-2" id="subtabs3">
                                </ul>
                            </div>
                            <div class="tab-content">
                                <div class="tab-pane active" id="tab-eg8-5" role="tabpanel">
                                    <?php include "hyundaiwebsite.php"; ?>
                                </div>
                                <div class="tab-pane" id="tab-eg8-6" role="tabpanel">
                                    <?php include "ctbwebsite.php"; ?>
                                </div>
                            </div>
                        </div>

                        <div class="tab-pane" id="tab-eg7-3" role="tabpanel">

                            <div class="card-header" style="margin-left:-15px">
                                <ul class="nav nav-justified ml-2" id="subtabs70">
                                </ul>
                            </div>
                            <div class="tab-content">
                                <div class="tab-pane active" id="tab-eg8-700" role="tabpanel">
                                    <?php include "facility.php"; ?>
                                </div>
                                <div class="tab-pane" id="tab-eg8-800" role="tabpanel">
                                    <?php include "test_drive1.php"; ?>
                                </div>
                            </div>
                        </div>

                        <div class="tab-pane" id="tab-eg7-4" role="tabpanel">
                            <div class="card-header" style="margin-left:-15px">
                                <ul class="nav nav-justified ml-2" id="subtabs4">
                                </ul>
                            </div>
                            <div class="tab-content">
                                <div class="tab-pane active" id="tab-eg8-7" role="tabpanel">
                                    <?php include "sales_consultantY.php"; ?>
                                </div>
                                <div class="tab-pane" id="tab-eg8-8" role="tabpanel">
                                    <?php include "sales_consultantN.php"; ?>
                                </div>
                            </div>
                        </div>
                        <!-- <div class="tab-pane" id="tab-eg7-5" role="tabpanel">
                                <?php //include "test_drive1.php"; ?>
                                <!-- <div class="card-header" style="margin-left:-15px">
                                    <ul class="nav nav-justified ml-2" id="subtabs7">
                                    </ul>
                                </div> -->
                        <!-- <div class="tab-content">
                                    <div class="tab-pane active" id="tab-eg8-15" role="tabpanel">
                                        <?php //include "test_drive1.php"; ?>
                                    </div>
                                    <div class="tab-pane" id="tab-eg8-16" role="tabpanel">
                                        <?php //include "test_drive2.php"; ?>
                                    </div>
                                </div> -->
                        <!-- </div>  -->
                        <div class="tab-pane" id="tab-eg7-5" role="tabpanel">
                            <?php include "deal.php"; ?>
                        </div>
                        <div class="tab-pane" id="tab-eg7-6" role="tabpanel">

                            <div class="card-header" style="margin-left:-15px">
                                <ul class="nav nav-justified ml-2" id="subtabs5">
                                </ul>
                            </div>
                            <div class="tab-content">
                                <div class="tab-pane active" id="tab-eg8-9" role="tabpanel">
                                    <?php include "paperwork_time.php"; ?>
                                </div>
                                <div class="tab-pane" id="tab-eg8-10" role="tabpanel">
                                    <?php //include "paperwork_process.php"; ?>
                                </div>
                                <div class="tab-pane" id="tab-eg8-11" role="tabpanel">
                                    <?php include "paperwork_attributes.php"; ?>
                                </div>
                            </div>
                        </div>
                        <div class="tab-pane" id="tab-eg7-7" role="tabpanel">
                            <div class="card-header" style="margin-left:-15px">
                                <ul class="nav nav-justified ml-2" id="subtabs6">
                                </ul>
                            </div>
                            <div class="tab-content">
                                <div class="tab-pane active" id="tab-eg8-12" role="tabpanel">
                                    <?php include "vehical_delivery.php"; ?>
                                </div>
                                <div class="tab-pane" id="tab-eg8-13" role="tabpanel">
                                    <?php include "service_dept.php"; ?>
                                </div>
                                <div class="tab-pane" id="tab-eg8-14" role="tabpanel">
                                    <?php include "delivery_attributes.php"; ?>
                                </div>
                            </div>
                        </div>

                        <div class="tab-pane" id="tab-eg7-8" role="tabpanel">
                            <?php include "heart.php"; ?>
                        </div>

                        <div class="tab-pane" id="tab-eg7-9" role="tabpanel">
                            
                             <div class="card-header" style="margin-left:-15px">
                                    <ul class="nav nav-justified ml-2" id="subtabs8">
                                    </ul>
                                </div>
                                <div class="tab-content"> 
                                    <div class="tab-pane active" id="tab-eg8-18" role="tabpanel">
                                        <?php include "top50.php"; ?>
                                    </div>
                                    <div class="tab-pane" id="tab-eg8-19" role="tabpanel">
                                        <?php include "top100.php"; ?>
                                    </div>
                                </div>

                        </div>
                        <div class="tab-pane" id="tab-eg7-10" role="tabpanel">
                            <?php include "trending.php"; ?>
                        </div>
                        <div class="tab-pane" id="tab-eg7-11" role="tabpanel">
                            <?php include "rating.php"; ?>
                        </div>
                        <div class="tab-pane" id="tab-eg7-12" role="tabpanel">
                            <div class="card-header" style="margin-left:-15px">
                                <ul class="nav nav-justified ml-2" id="subtabs9">
                                </ul>
                            </div>
                            <div class="tab-content">
                                <div class="tab-pane active" id="tab-eg8-50" role="tabpanel">
                                    <?php include "benchnps.php"; ?>
                                </div>
                                <div class="tab-pane" id="tab-eg8-51" role="tabpanel">
                                    <?php include "benchfactor.php"; ?>
                                </div>
                            </div>
                        </div>
                        <div class="tab-pane" id="tab-eg7-13" role="tabpanel">
                            <div class="card-header" style="margin-left:-15px" id="cardsubtabs999">
                                <ul class="nav nav-justified ml-2" id="subtabs999">
                                </ul>
                            </div>
                            <div class="tab-content">
                                <?php if($_SESSION['user_type']==1){
                                ?>
                                <div class="tab-pane active" id="tab-eg8-403" role="tabpanel">
                                    <?php include "customer2.php"; ?>
                                </div>
                                <div class="tab-pane" id="tab-eg8-404" role="tabpanel">
                                    <?php include "customer.php"; ?>
                                </div>
                                <?php } else { ?>
                                <div class="tab-pane active" id="tab-eg8-403" role="tabpanel">
                                    <?php include "customer2.php"; ?>
                                </div>
                                <?php } ?>
                                
                            </div>
                            
                        </div>
                        <div class="tab-pane" id="tab-eg7-14" role="tabpanel">
                            <div class="card-header" style="margin-left:-15px">
                                <ul class="nav nav-justified ml-2" id="subtabs90">
                                </ul>
                            </div>
                            <div class="tab-content">
                                <div class="tab-pane active" id="tab-eg8-510" role="tabpanel">
                                    <?php include "action2.php"; ?>
                                </div>
                                <div class="tab-pane" id="tab-eg8-500" role="tabpanel">
                                    <?php include "action.php"; ?>
                                </div>
                                
                            </div>

                        </div>
                        <div class="tab-pane" id="tab-eg7-15" role="tabpanel">
                            <?php include "recordTab.php"; ?>
                        </div>
                        <div class="tab-pane" id="tab-eg7-16" role="tabpanel">
                            
                        </div>
                        <div class="tab-pane" id="tab-eg7-17" role="tabpanel">
                            
                        </div>
                        <div class="tab-pane" id="tab-eg7-18" role="tabpanel">
                            <?php include "trends.php"; ?>
                        </div>




                    </div>

                </div>

            </div>
        </div>
        <!--Main Body -->
    </div>
    <div class="popup-btn" onclick="openF()">
        <a href="javascript:void(0)" style="right:170px !important">
            FILTERS
        </a>
    </div>
    <div class="popup-btn" onclick="trends()" id="trends_div">
        <a href="javascript:void(0)" id="trends_btn" style="width:auto;">TRENDS</a>
    </div>
    <div id="mySidebar2" class="sidebar2">
        <a href="javascript:void(0)" class="closebtn" onclick="closeF()">×</a>
        <ul class="vertical-nav-menu mb-5"
            style="padding:0px 20px 20px 20px !important;font-family: 'Roboto', sans-serif" id="filterX">

            <?php include('filter.php');?>
        </ul>
    </div>

    <div class="table-responsive" style="display:none">
        <table id="availindex_tbl" class="table table-striped table-bordered no-footer text-center display"
            style="font-size:12px">
            <thead>
                <tr>
                    <th>Base</th>
                    <th>Vi</th>
                    <th>Airtel</th>
                    <th>Jio</th>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    </div>
    <div class="table-responsive" style="display:none">
        <table id="visiindex_tbl" class="table table-striped table-bordered no-footer text-center display"
            style="font-size:12px">
            <thead>
                <tr>
                    <th>Base</th>
                    <th>Vi</th>
                    <th>Airtel</th>
                    <th>Jio</th>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    </div>
    <div class="table-responsive" style="display:none">
        <table id="npsindex_tbl" class="table table-striped table-bordered no-footer text-center display"
            style="font-size:12px">
            <thead>
                <tr>
                    <th>Base</th>
                    <th>Vi</th>
                    <th>Airtel</th>
                    <th>Jio</th>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    </div>

    <div class="table-responsive" style="display:none">
        <table id="nss_tbl" class="table table-striped table-bordered no-footer text-center display"
            style="font-size:12px">
            <thead>
                <tr>
                    <th>Brand 1</th>
                    <th>Brand 2</th>
                    <th>Brand 3</th>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    </div>

    <div class="table-responsive" style="display:none">
        <table id="shopcategory_tbl" class="table table-striped table-bordered no-footer text-center display"
            style="font-size:12px">
            <thead>
                <tr>
                    <th>Base</th>
                    <th>Brand 1</th>
                    <th>Brand 2</th>
                    <th>Brand 3</th>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    </div>

    <div class="table-responsive" style="display:none">
        <table id="circle_tbl" class="table table-striped table-bordered no-footer text-center display"
            style="font-size:12px">
            <thead>
                <tr>
                    <th>Base</th>
                    <th>Brand 1</th>
                    <th>Brand 2</th>
                    <th>Brand 3</th>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    </div>

    <div class="table-responsive" style="display:none">
        <table id="townclass_tbl" class="table table-striped table-bordered no-footer text-center display"
            style="font-size:12px">
            <thead>
                <tr>
                    <th>Base</th>
                    <th>Brand 1</th>
                    <th>Brand 2</th>
                    <th>Brand 3</th>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    </div>

    <div class="table-responsive" style="display:none">
        <table id="kpioverall_tbl" class="table table-striped table-bordered no-footer text-center display"
            style="font-size:12px">
            <thead>
                <tr>
                    <th>Month</th>
                    <th>Base</th>
                    <th>Brand 1</th>
                    <th>Brand 2</th>
                    <th>Brand 3</th>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    </div>

    <div class="table-responsive" style="display:none">
        <table id="shopcattrends_tbl" class="table table-striped table-bordered no-footer text-center display"
            style="font-size:12px">
            <thead>
                <tr>
                    <th>Month</th>
                    <th>Base</th>
                    <th>Brand 1</th>
                    <th>Brand 2</th>
                    <th>Brand 3</th>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    </div>

    <div class="table-responsive" style="display:none">
        <table id="tblOver" class="table table-striped table-bordered no-footer text-center display"
            style="font-size:12px">
            <thead style="background-color:#002a5c;color:#fff;width:100%">
                <tr>
                        <td id="first_row3">S.no</td>
                        <td>Name</td>
                        <td>Score</td>
                </tr>
            </thead>
            <tbody>

            </tbody>
        </table>
    </div>
    <div class="table-responsive" style="display:none">
        <table id="tblKey" class="table table-striped table-bordered no-footer text-center display"
            style="font-size:12px">
            <thead style="background-color:#002a5c;color:#fff;width:100%">
                <tr>
                    <td id="first_row4">S.no</td>
                    <td>Name</td>
                    <td>Overall Score</td>
                    <td>Filtered Score</td>
                    <td>Comments</td>
                    <td>Zone</td>
                    <td>Region</td>
                    <td>Main dealer_name</td>
                    <td>Dealer name</td>
                    <td>State</td>
                    <td>City</td>
                    <td>Quarter</td>
                </tr>
            </thead>
            <tbody>

            </tbody>
        </table>
    </div>


    <!--<textarea class="paraZ hidden" style="height:auto;max-width:200px;word-wrap:break-word;"><b>Filters</b>:All Selected</textarea>-->

    <textarea class="paraZ hidden"
        style="height:auto;max-width:200px;word-wrap:break-word;"><b>Month</b>: Apr'22 <br><b>Time Period</b>: 3 Month Rolling <br></textarea>

    <script type="text/javascript" src="assets/scripts/main.js"></script>
    <script type="text/javascript" src="assets/js/select2.min.js"></script>
    <script type="text/javascript" src="https://code.highcharts.com/highcharts.js"></script>
    <script type="text/javascript" src="https://code.highcharts.com/modules/variable-pie.js"></script>
    <script type="text/javascript" src="https://code.highcharts.com/highcharts-more.js"></script>
    <script type="text/javascript" src="https://code.highcharts.com/modules/exporting.js"></script>
    <script type="text/javascript" src="https://code.highcharts.com/modules/offline-exporting.js"></script>
    <script type="text/javascript" src="assets/js/jquery.dataTables.min.js"></script>
    <script type="text/javascript" src="assets/js/dataTables.bootstrap4.min.js"></script>
    <script type="text/javascript" src="assets/js/dataTables.buttons.min.js"></script>
    <script type="text/javascript" src="assets/js/buttons.html5.min.js"></script>
    <script type="text/javascript" src="assets/js/jszip.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"
        integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous">
    </script>
    <script type="text/javascript"
        src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-multiselect/0.9.15/js/bootstrap-multiselect.min.js">
    </script>
    <script type="text/javascript"
        src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-multiselect/0.9.15/js/bootstrap-multiselect.js"></script>
    <script type="text/javascript"
        src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-multiselect/0.9.15/js/bootstrap-multiselect.min.js.map">
    </script>
    <script type="text/javascript" src="https://unpkg.com/jspdf@latest/dist/jspdf.umd.min.js"></script>
    <script type="text/javascript" src="https://cdn.jsdelivr.net/gh/linways/table-to-excel@v1.0.4/dist/tableToExcel.js">
    </script>
    <?php if($_SESSION['user_type']!=1){
?>

    <script>
    setInterval(function() {
        $("#q5").parent().parent().parent().parent().hide();
        $("#q4").parent().parent().hide();
        $("#ssiperformance").parent().parent().addClass("hnH");
        $("#q9").parent().parent().parent().parent().addClass("hnH");
        $("#q8").parent().parent().addClass("expD");
        $("#q5line_card").parent().parent().hide();
        $("#q4line_card").parent().parent().hide();

        $("#ssiline_card").parent().parent().addClass("hnH");
        $("#q9line_card").parent().parent().addClass("hnH");
        $("#q8line_card").parent().parent().addClass("expD");
    }, 200);
    </script>
    <?php

}	?>
    <script>
    window.alert = function() {};
    var attr_arr = <?php echo json_encode($attr_arr); ?>;
    var cityLengthX = stateLengthX = zoneLengthX = regionLengthX = dealerLengthX = '';
    var conX = '';
    var conY = '';
    var conZ = '';
    var filtercondX = '';
    var filtercondX2 = '';
    var tablecondX = ``;
    var condX = ``;
    var conddealerX = ``;
    var tabsNames = ``;
    var tabsName = `Overall Performance`;
    var colors = ['#004D99', '#CC0052', '#00B3B3', '#BF77F6', '#00AAFF', '#004D99'];
    //var TN = 'Digitization';
    var benchCat = ['All India', "Zone", "Region", "Dealer"];
    var f1V;
    var f2V;
    var f3V;
    var f4V;
    var f5V;
    var f6V;
    var timeText = [];
    var datafortable = [];
    var datafortable2 = [];
    var benchindianpsPPT = [];
    var benchzonenpsPPT = [];
    var benchregionnpsPPT = [];
    var benchdealernpsPPT = [];
    var benchsubdealernpsPPT = [];
    var benchstatenpsPPT = [];
    var benchcitynpsPPT = [];
    var benchindiafactorPPT = [];
    var benchzonefactorPPT = [];
    var benchregionfactorPPT = [];
    var benchdealerfactorPPT = [];
    var benchsubdealerfactorPPT = [];
    var benchstatefactorPPT = [];
    var benchcityfactorPPT = [];
    var cat2;
    var val2;
    var cat2X;
    var val2X;
    var zonalNPSLuciferPPTlabel = [];
    var zonalNPSLuciferPPTvalue = [];
    var zonalSSILuciferPPTlabel = [];
    var zonalSSILuciferPPTvalue = [];

    var regionalNPSLuciferPPTlabel = [];
    var regionalNPSLuciferPPTvalue = [];
    var regionalSSILuciferPPTlabel = [];
    var regionalSSILuciferPPTvalue = [];


    // jQuery(function(){
    //     jQuery('#btnread').click();
    // });
    $(document).ready(function() {
        //  alert(window.innerWidth);
        var addText3 = $(".paraZ").val();
        //console.log(addText3);
        $(".tb").each(function() {
            tabsNames = $(this).attr("data-tab");
            var subTabs1 = ``;
            subTabs1 +=
                `<li class="nav-item nav-mob1"><a data-toggle="tab" href="#tab-eg8-0" class="active nav-link ash " style="border-radius:20px">Overall Performance</a></li>`;
            subTabs1 +=
                `<li class="nav-item nav-mob1"><a data-toggle="tab" href="#tab-eg8-1" class="nav-link ash " style="border-radius:20px">Zone wise Performance</a></li>`;
            subTabs1 +=
                `<li class="nav-item nav-mob1"><a data-toggle="tab" href="#tab-eg8-17" class="nav-link ash " style="border-radius:20px">Region wise Performance</a></li>`;
            $("#subtabs1").empty().append(subTabs1);

        });
        $("ul.metismenu>li:first").addClass("mm-active");
        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li.tb:first").addClass("active");
        $("li.mm-active>ul.mm-collapse>li.tb:first>a").attr("aria-expanded", "true");
        $('li.mm-active>ul.mm-collapse>li.tb:first>a[aria-expanded="true"]').addClass("activelink");



        // $("ul.nav>li:first").addClass("active");
        // $("ul.nav>li.active>a").css('background-color','#003e80');
        // $("ul.nav>li.active>a").css('color','#FFFFFF');
        // $("li.active>li:first>a").attr("aria-expanded","true");
        // $('li.active>li:first>a[aria-expanded="true"]').addClass("active");
        // $('li.active>li:first>a[aria-expanded="false"]').removeClass("active");
        // $('li.active>li:first>a[aria-expanded="false"]').css('background-color','#ffffff');

        $('#city').multiselect({
            includeSelectAllOption: true,
            enableFiltering: true,
            enableFullValueFiltering: true
        });
        $("#city").multiselect('selectAll', false);
        $("#city").multiselect("deselectAll", false);
        $("#city").multiselect('updateButtonText');

        $('#state').multiselect({
            includeSelectAllOption: true,
            enableFiltering: true,
            enableFullValueFiltering: true
        });
        $("#state").multiselect('selectAll', false);
        $("#state").multiselect("deselectAll", false);
        $("#state").multiselect('updateButtonText');



        $('#zone').multiselect({
            includeSelectAllOption: true,
            enableFiltering: true,
            enableFullValueFiltering: true
        });
        $("#zone").multiselect('selectAll', false);
        $("#zone").multiselect("deselectAll", false);
        $("#zone").multiselect('updateButtonText');

        $('#time').multiselect({
            includeSelectAllOption: true
        });
       // $("#time").multiselect('selectAll', false);
        $("#time").multiselect('updateButtonText');

        //zoneLengthX = $("#zone").val().length;

        $("#zone").on('change', function() {
            //debugger;
            // alert("hiii")
            var timeVal = $('#time option:selected').map(function(i, v) {
            return this.value;

            }).get();
            console.log("oncgange");
            console.log(timeVal);
            var zoneid = $(this).val();
            if (zoneid != "") {
                zoneid = zoneid.toString();
            }
            //alert(zoneid);
            $.ajax({
                method: "POST",
                url: "api/ajaxF.php",
                data: {
                    'id': zoneid,
                    'timeX': timeVal,
                },
                datatype: "html",
                success: function(response) {
                    // //////debugger;
                    var data = JSON.parse(response);
                    console.log("xzx");
                    console.log(data);
                    var html = ``;
                    // html += `<legend style="font-size: 12px"><b style="font-size: 14px">Zone</b></legend>`;
                    // html += `<select id="zone" class="form-control" multiple="multiple" style="height:35px;margin-top:-10px;font-size:0.8rem !important;border: 1px solid grey !important">`;


                    for (var i = 0; i < data.length; i++) {
                        ////debugger;
                        <?php
						if($user_type>=7)
						{
						 
						 ?>

                        var rgch = `${data[i]}`;
                        if (rgch == "<?php echo trim($dealer_code); ?>") {
                            html +=
                                `<option value="${data[i]}" selected>${data[i]}</option>`;

                        }

                        <?php
						
						}
						else{
						?>

                        html += `<option value="${data[i]}">${data[i]}</option>`;

                        <?php
						}		
						?>


                    }
                    // html += `</select>`;
                    //console.log(html);
                    $("#region").empty()
                    $("#region").append(html);
                    $("#regionField").show();

                    $("#stateField").hide();
                    $("#maindealerField").hide();
                    $("#dealerField").hide();
                    $("#cityField").hide();



                },
                complete: function() {

                    setTimeout(function() {
                        $('#region').multiselect({
                            includeSelectAllOption: true,
                            enableFiltering: true,
                            enableFullValueFiltering: true
                        });
                        $("#region").multiselect('selectAll', false);
                        $("#region").multiselect("deselectAll", false);
                        $("#region").multiselect('updateButtonText');
                        $("#region").multiselect('rebuild');
                        $("#region").change(); /*NCH Sar*/
                    }, 2000);
                }
            });
        });
        var regAF = 0;
        $("#region").on('change', function() {
            var timeVal = $('#time option:selected').map(function(i, v) {
            return this.value;

            }).get();
            var regionid = $(this).val();
            if (regionid != "") {
                regionid = regionid.toString();
            }
            $.ajax({
                method: "POST",
                url: "api/ajaxF2.php",
                data: {
                    'id': regionid,
                    'timeX': timeVal,
                },
                datatype: "html",
                success: function(response) {

                    var data = JSON.parse(response);
                    var stateV = data['state'];
                    var dealerV = data['main_dealer'];
                    var html = ``;
                    for (var i = 0; i < stateV.length; i++) {
                        html += `<option value="${stateV[i]}">${stateV[i]}</option>`;
                    }
                    $("#state").empty().append(html);
                    $("#stateField").show();

                    var html2 = ``;
                    html2 += `<option value="0">-SELECT MAIN DEALER-</option>`;
                    for (var i = 0; i < dealerV.length; i++) {

                        html2 += `<option value="${dealerV[i]}">${dealerV[i]}</option>`;
                    }
                    $("#maindealer").empty().append(html2);
                    $("#maindealerField").show();
                },
                complete: function() {
                    setTimeout(function() {
                        $('#state').multiselect({
                            includeSelectAllOption: true,
                            enableFiltering: true,
                            enableFullValueFiltering: true
                        });
                        $("#state").multiselect('selectAll', false);
                        $("#state").multiselect('updateButtonText');
                        $("#state").multiselect("deselectAll", false);
                        $("#state").multiselect('rebuild');

                        if (regAF == 0) {
                            <?php
			if($user_type>=7 and $user_type<=23)
				{
			?>
                            applyF(2);
                            <?php
				}
			?>
                            regAF = 1;
                        }
                    }, 2000);
                }
            });
        });

        $("#maindealer").on('change', function() {
            ////////debugger;
            var timeVal = $('#time option:selected').map(function(i, v) {
            return this.value;

            }).get();
            var maindealerid = $(this).val();
            $.ajax({
                method: "POST",
                url: "api/ajaxF4.php",
                data: {
                    'id': maindealerid,
                    'timeX': timeVal,

                },
                datatype: "html",
                success: function(response) {
                    var data = JSON.parse(response);
                    //console.log(data);
                    var html = ``;
                    // html += `<legend style="font-size: 12px"><b style="font-size: 14px">City</b></legend>`;
                    // html += `<select id="city" class="form-control" multiple="multiple" style="height:35px;margin-top:-10px;font-size:0.8rem !important;border: 1px solid grey !important">`;

                    html += `<option value="0">-SELECT DEALER-</option>`;
                    for (var i = 0; i < data.length; i++) {
                        html += `<option value="${data[i]}">${data[i]}</option>`;
                    }

                    //  html += ` </select> `;
                    //console.log(html);
                    $("#dealer").empty().append(html);



                    $("#dealerField").show();
                },

            });
        });

        $("#state").on('change', function() {
            ////////debugger;
            var timeVal = $('#time option:selected').map(function(i, v) {
            return this.value;

            }).get();
            var stateid = $(this).val();
            $.ajax({
                method: "POST",
                url: "api/ajaxF3.php",
                data: {
                    'id': stateid,
                    'timeX': timeVal,
                },
                datatype: "html",
                success: function(response) {
                    var data = JSON.parse(response);
                    //console.log(data);
                    var html = ``;
                    // html += `<legend style="font-size: 12px"><b style="font-size: 14px">City</b></legend>`;
                    // html += `<select id="city" class="form-control" multiple="multiple" style="height:35px;margin-top:-10px;font-size:0.8rem !important;border: 1px solid grey !important">`;


                    for (var i = 0; i < data.length; i++) {
                        html += `<option value="${data[i]}">${data[i]}</option>`;
                    }

                    //  html += ` </select> `;
                    //console.log(html);
                    $("#city").empty().append(html);



                    $("#cityField").show();
                },
                complete: function() {
                    //   alert("qw");
                    setTimeout(function() {
                        $('#city').multiselect({
                            includeSelectAllOption: true,
                            enableFiltering: true,
                            enableFullValueFiltering: true
                        });
                        $("#city").multiselect('selectAll', false);
                        $("#city").multiselect('updateButtonText');
                        $("#city").multiselect("deselectAll", false);
                        $("#city").multiselect('rebuild');

                    }, 2000);
                }
            });
        });




        <?php
			if($user_type>=1 and $user_type<=6)
				{
			?>
        applyF(1);
        $("#zone").change();
        <?php
				}
				if($user_type>=999)
				{			
				?>
        $("#regionField").show();
        $("#maindealerField").show();
        maindealerLogicF();
        <?php
			
			if($_SESSION['dealer_code_Wice']=='0'){
			?>
        $("#maindealer").change();
        <?php
						
			}
			?>
        $('#region').multiselect({
            includeSelectAllOption: true,
            enableFiltering: true,
            enableFullValueFiltering: true
        });
        applyF(1);
        <?php
				}
				else{
				?>
        applyF(0);
        $("#zone").change();
        <?php			
				}
			?>
    });
    setTimeout(() => {
        var ash = document.getElementById('topd');
        $("#topd").css("width", "100%");
        $("#topd2").css("width", "100%");


        // ash.fnSort( [ [1,'desc'] ] );

    }, 10000);

    function zoom() {
        document.body.style.zoom = "300%";
    }

    function openF() {

        document.getElementById("mySidebar2").style.width = "300px";
        document.getElementById("app-containerX").style.opacity = "0.5";
    }

    function closeF() {
        document.getElementById("mySidebar2").style.width = "0px";
        document.getElementById("app-containerX").style.opacity = "1";
    }

    function resetFilters() {
        window.location.href = "home.php";

    }


    //=================================open navigation bar============================================
    function navbar() {
        var navSize = document.getElementById("mySidebar").style.width;
        if (navSize == "230px") {
            return close();
        }
        return open();
    }

    function open() {
        document.getElementById("mySidebar").style.width = "230px";
        document.getElementById("main").style.marginLeft = "230px";
        var tglBtn = document.getElementById("openbtn");
        tglBtn.classList.add("openbtnShow");
        document.body.style.backgroundColor = "#D9D9D9";
    }

    function close() {
        document.getElementById("mySidebar").style.width = "0";
        document.getElementById("main").style.marginLeft = "0";
        var tglBtn = document.getElementById("openbtn");
        tglBtn.classList.remove("openbtnShow");
        document.body.style.backgroundColor = "white";
    }
    //=================================Logout============================================
    function logout() {
        ////////debugger;
        window.stop();
        $.ajax({
            url: "api/logout.php",
            type: "POST",
            data: {
                'action': 'logout'
            },
            success: function(response) {
                ////////debugger;
                if (response == "success") {
                    window.location.href = "index.php";
                }
            }
        })
    }
    //=================================Get Tab Name============================================
    $(".tb").click(function() {
        //////debugger;
        var textX = document.getElementById("trends_btn").textContent;
        tabsName = $(this).attr("data-tab");
        var subsTab1 = ``;
        var subsTab2 = ``;
        var subsTab3 = ``;
        var subsTab4 = ``;
        var subsTab5 = ``;
        var subsTab6 = ``;
        var subsTab7 = ``;
        var subsTab8 = ``;
        var subsTab9 = ``;
        var subsTab90 = ``;
        var subsTab999 = ``;
        //alert(tabsName);
if (tabsName == 'Action Plan Log') {
	if($("#tab-eg7-17 .Alog_table").length==0){
	$("#tab-eg7-17").load("actionlog.php", {user_type : "<?php echo $user_type; ?>",dealer_code : "<?php echo $dealer_code; ?>" });
	}
}
if (tabsName == 'User Log') {
	if($("#tab-eg7-16 .Ulog_table").length==0){
	$("#tab-eg7-16").load("userlog.php", {user_type : "<?php echo $user_type; ?>",dealer_code : "<?php echo $dealer_code; ?>" });
	}
}
        if (tabsName == 'Overall Performance') {
            $("#tab-eg8-0").addClass("active");
            $("#tab-eg8-1").removeClass("active");
            $("#tab-eg8-17").removeClass("active");
            var html = ``;
            html += `<h6 class="ml-2 mt-2"><b style="font-weight: 500;color:#003266">${tabsName}</b></h6>`
            $("#activetabname").empty().append(html);

            subsTab1 +=
                `<li class="nav-item nav-mob1"><a data-toggle="tab" href="#tab-eg8-0" class="active nav-link ash " style="border-radius:20px">Overall Performance</a></li>`;
            subsTab1 +=
                `<li class="nav-item nav-mob1"><a data-toggle="tab" href="#tab-eg8-1" class="nav-link ash " style="border-radius:20px">Zone wise Performance</a></li>`;
            subsTab1 +=
                `<li class="nav-item nav-mob1"><a data-toggle="tab" href="#tab-eg8-17" class="nav-link ash " style="border-radius:20px">Region wise Performance</a></li>`;
            $("#subtabs1").empty().append(subsTab1);

            var htmlBtn = ``;
            $("#chart_convert").empty().append(htmlBtn);

            document.getElementById("trends_btn").textContent = "TRENDS";
            document.getElementById("trends_btn").classList.remove("customback");

            $("#trends_div").show();
        }
        if (tabsName == 'Digitization') {
            $("#tab-eg8-5").addClass("active");
            $("#tab-eg8-6").removeClass("active");
            
            var html = ``;
            html += `<h6 class="ml-2 mt-2"><b style="font-weight: 500;color:#003266">${tabsName}</b></h6>`
            $("#activetabname").empty().append(html);

            subsTab3 +=
                `<li class="nav-item nav-mob1"><a data-toggle="tab" href="#tab-eg8-5" class="active nav-link ash " style="border-radius:20px">Overall Experience on Hyundai India Website</a></li>`;
            subsTab3 +=
                `<li class="nav-item nav-mob1"><a data-toggle="tab" href="#tab-eg8-6" class="nav-link ash " style="border-radius:20px">Overall Experience on CTB Website</a></li>`;
            $("#subtabs3").empty().append(subsTab3);

            var htmlBtn = ``;
            $("#chart_convert").empty().append(htmlBtn);
            document.getElementById("trends_btn").textContent = "TRENDS";
            document.getElementById("trends_btn").classList.remove("customback");
            $("#tab-eg1-0").show();
            $("#tab-eg1-1").hide();
            $("#tab-eg1-2").hide();
            $("#tab-eg1-3").hide();
            $("#tab-eg1-4").hide();
            $("#tab-eg1-5").hide();
            $("#tab-eg1-6").hide();
        }

        if (tabsName == 'Facility') {
            $("#tab-eg8-700").addClass("active");
            $("#tab-eg8-800").removeClass("active");

            var html = ``;
            html +=
                `<h6 class="ml-2 mt-2"><b style="font-weight: 500;color:#003266">${tabsName}-Weak Areas</b></h6>`
            $("#activetabname").empty().append(html);
            var htmlBtn = ``;

            var subsTab70 = ``;

            subsTab70 +=
                `<li class="nav-item nav-mob1"><a data-toggle="tab" href="#tab-eg8-700" class="active nav-link ash " style="border-radius:20px">Facility</a></li>`;
            subsTab70 +=
                `<li class="nav-item nav-mob1"><a data-toggle="tab" href="#tab-eg8-800" class="nav-link ash " style="border-radius:20px">Test Drive</a></li>`;
            $("#subtabs70").empty().append(subsTab70);

            $("#chart_convert").empty().append(htmlBtn);
            document.getElementById("trends_btn").textContent = "TRENDS";
            document.getElementById("trends_btn").classList.remove("customback");
            $("#tab-eg1-0").hide();
            $("#tab-eg1-1").show();
            $("#tab-eg1-2").hide();
            $("#tab-eg1-3").hide();
            $("#tab-eg1-4").hide();
            $("#tab-eg1-5").hide();
            $("#tab-eg1-6").hide();

            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:first>a").attr(
                "aria-expanded", "false");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(2)>a").attr(
                "aria-expanded", "true");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(3)>a").attr(
                "aria-expanded", "false");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(4)>a").attr(
                "aria-expanded", "false");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(5)>a").attr(
                "aria-expanded", "false");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(6)>a").attr(
                "aria-expanded", "false");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(7)>a").attr(
                "aria-expanded", "false");
        }
        if (tabsName == 'Sales Consultant') {
            $("#tab-eg8-7").addClass("active");
            $("#tab-eg8-8").removeClass("active");

            var html = ``;
            html += `<h6 class="ml-2 mt-2"><b style="font-weight: 500;color:#003266">${tabsName}</b></h6>`
            $("#activetabname").empty().append(html);
            subsTab4 +=
                `<li class="nav-item nav-mob1"><a data-toggle="tab" href="#tab-eg8-7" class="active nav-link ash " style="border-radius:20px">Diagnostics(Sales Consultant)</a></li>`;
            subsTab4 +=
                `<li class="nav-item nav-mob1"><a data-toggle="tab" href="#tab-eg8-8" class="nav-link ash " style="border-radius:20px">Diagnostics- Weak Areas</a></li>`;
            $("#subtabs4").empty().append(subsTab4);

            var htmlBtn = ``;
            $("#chart_convert").empty().append(htmlBtn);
            document.getElementById("trends_btn").textContent = "TRENDS";
            document.getElementById("trends_btn").classList.remove("customback");

            $("#tab-eg1-0").hide();
            $("#tab-eg1-1").hide();
            $("#tab-eg1-2").show();
            $("#tab-eg1-3").hide();
            $("#tab-eg1-4").hide();
            $("#tab-eg1-5").hide();
            $("#tab-eg1-6").hide();

            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:first>a").attr(
                "aria-expanded", "false");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(2)>a").attr(
                "aria-expanded", "false");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(3)>a").attr(
                "aria-expanded", "true");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(4)>a").attr(
                "aria-expanded", "false");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(5)>a").attr(
                "aria-expanded", "false");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(6)>a").attr(
                "aria-expanded", "false");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(7)>a").attr(
                "aria-expanded", "false");
        }
        if (tabsName == 'Test Drive') {
            var html = ``;
            html += `<h6 class="ml-2 mt-2"><b style="font-weight: 500;color:#003266">${tabsName}</b></h6>`
            $("#activetabname").empty().append(html);
            //subsTab7 += `<li class="nav-item nav-mob1"><a data-toggle="tab" href="#tab-eg8-15" class="active nav-link ash " style="border-radius:20px">Test Drive Offer & Experience</a></li>`;
            //subsTab7 += `<li class="nav-item nav-mob1"><a data-toggle="tab" href="#tab-eg8-16" class="nav-link ash " style="border-radius:20px">Test Drive at the Dealership of Vehicle Purchase</a></li>`;
            $("#subtabs7").empty().append(subsTab7);

            var htmlBtn = ``;
            $("#chart_convert").empty().append(htmlBtn);
            document.getElementById("trends_btn").textContent = "TRENDS";
            document.getElementById("trends_btn").classList.remove("customback");

            $("#tab-eg1-0").hide();
            $("#tab-eg1-1").hide();
            $("#tab-eg1-2").hide();
            $("#tab-eg1-3").show();
            $("#tab-eg1-4").hide();
            $("#tab-eg1-5").hide();
            $("#tab-eg1-6").hide();

            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:first>a").attr(
                "aria-expanded", "false");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(2)>a").attr(
                "aria-expanded", "false");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(3)>a").attr(
                "aria-expanded", "false");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(4)>a").attr(
                "aria-expanded", "true");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(5)>a").attr(
                "aria-expanded", "false");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(6)>a").attr(
                "aria-expanded", "false");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(7)>a").attr(
                "aria-expanded", "false");
        }
        if (tabsName == 'Deal') {
            var html = ``;
            html += `<h6 class="ml-2 mt-2"><b style="font-weight: 500;color:#003266">${tabsName}</b></h6>`
            $("#activetabname").empty().append(html);
            var htmlBtn = ``;
            $("#chart_convert").empty().append(htmlBtn);
            document.getElementById("trends_btn").textContent = "TRENDS";
            document.getElementById("trends_btn").classList.remove("customback");

            $("#tab-eg1-0").hide();
            $("#tab-eg1-1").hide();
            $("#tab-eg1-2").hide();
            $("#tab-eg1-3").hide();
            $("#tab-eg1-4").show();
            $("#tab-eg1-5").hide();
            $("#tab-eg1-6").hide();

            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:first>a").attr(
                "aria-expanded", "false");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(2)>a").attr(
                "aria-expanded", "false");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(3)>a").attr(
                "aria-expanded", "false");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(4)>a").attr(
                "aria-expanded", "false");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(5)>a").attr(
                "aria-expanded", "true");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(6)>a").attr(
                "aria-expanded", "false");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(7)>a").attr(
                "aria-expanded", "false");
        }
        if (tabsName == 'Paperwork') {
            $("#tab-eg8-9").addClass("active");
            $("#tab-eg8-10").removeClass("active");
            $("#tab-eg8-11").removeClass("active");

            var html = ``;
            html += `<h6 class="ml-2 mt-2"><b style="font-weight: 500;color:#003266">${tabsName}</b></h6>`
            $("#activetabname").empty().append(html);
            subsTab5 +=
                `<li class="nav-item nav-mob1"><a data-toggle="tab" href="#tab-eg8-9" class="active nav-link ash " style="border-radius:20px">Time Taken to Complete paperwork</a></li>`;
            //subsTab5 += `<li class="nav-item nav-mob1"><a data-toggle="tab" href="#tab-eg8-10" class="nav-link ash " style="border-radius:20px">Paperwork Process Explanation</a></li>`;
            subsTab5 +=
                `<li class="nav-item nav-mob1"><a data-toggle="tab" href="#tab-eg8-11" class="nav-link ash " style="border-radius:20px">Diagnostics</a></li>`;
            $("#subtabs5").empty().append(subsTab5);

            var htmlBtn = ``;
            $("#chart_convert").empty().append(htmlBtn);
            document.getElementById("trends_btn").textContent = "TRENDS";
            document.getElementById("trends_btn").classList.remove("customback");

            $("#tab-eg1-0").hide();
            $("#tab-eg1-1").hide();
            $("#tab-eg1-2").hide();
            $("#tab-eg1-3").hide();
            $("#tab-eg1-4").hide();
            $("#tab-eg1-5").show();
            $("#tab-eg1-6").hide();

            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:first>a").attr(
                "aria-expanded", "false");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(2)>a").attr(
                "aria-expanded", "false");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(3)>a").attr(
                "aria-expanded", "false");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(4)>a").attr(
                "aria-expanded", "false");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(5)>a").attr(
                "aria-expanded", "false");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(6)>a").attr(
                "aria-expanded", "true");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(7)>a").attr(
                "aria-expanded", "false");
        }
        if (tabsName == 'Delivery') {
            $("#tab-eg8-12").addClass("active");
            $("#tab-eg8-13").removeClass("active");
            $("#tab-eg8-14").removeClass("active");

            var html = ``;
            html += `<h6 class="ml-2 mt-2"><b style="font-weight: 500;color:#003266">${tabsName}</b></h6>`
            $("#activetabname").empty().append(html);
            subsTab6 +=
                `<li class="nav-item nav-mob1"><a data-toggle="tab" href="#tab-eg8-12" class="active nav-link ash " style="border-radius:20px">Vehicle Delivery Condition/Quality/Time Taken</a></li>`;
            subsTab6 +=
                `<li class="nav-item nav-mob1"><a data-toggle="tab" href="#tab-eg8-13" class="nav-link ash " style="border-radius:20px">Introduction to Service Department</a></li>`;
            subsTab6 +=
                `<li class="nav-item nav-mob1"><a data-toggle="tab" href="#tab-eg8-14" class="nav-link ash " style="border-radius:20px">Diagnostics</a></li>`;
            $("#subtabs6").empty().append(subsTab6);

            var htmlBtn = ``;
            $("#chart_convert").empty().append(htmlBtn);
            document.getElementById("trends_btn").textContent = "TRENDS";
            document.getElementById("trends_btn").classList.remove("customback");

            $("#tab-eg1-0").hide();
            $("#tab-eg1-1").hide();
            $("#tab-eg1-2").hide();
            $("#tab-eg1-3").hide();
            $("#tab-eg1-4").hide();
            $("#tab-eg1-5").hide();
            $("#tab-eg1-6").show();

            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:first>a").attr(
                "aria-expanded", "false");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(2)>a").attr(
                "aria-expanded", "false");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(3)>a").attr(
                "aria-expanded", "false");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(4)>a").attr(
                "aria-expanded", "false");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(5)>a").attr(
                "aria-expanded", "false");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(6)>a").attr(
                "aria-expanded", "false");
            $("ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:nth-child(7)>a").attr(
                "aria-expanded", "true");
        }

        if (tabsName == 'Factors') {
            $("#tab-eg8-2").addClass("active");
            $("#tab-eg8-3").removeClass("active");

            var html = ``;
            html += `<h6 class="ml-2 mt-2"><b style="font-weight: 500;color:#003266">${tabsName}</b></h6>`
            $("#activetabname").empty().append(html);

            subsTab2 +=
                `<li class="nav-item nav-mob1"><a data-toggle="tab" href="#tab-eg8-2" class="active nav-link ash " style="border-radius:20px">Factor Chart</a></li>`;
            subsTab2 +=
                `<li class="nav-item nav-mob1"><a data-toggle="tab" href="#tab-eg8-3" class="nav-link ash " style="border-radius:20px">Factor Table</a></li>`;
            // subsTab2 +=
                // `<li class="nav-item nav-mob1"><a data-toggle="tab" href="#tab-eg8-4" class="nav-link ash " style="border-radius:20px">Vehicle delivery</a></li>`;
            $("#subtabs2").empty().append(subsTab2);

            var htmlBtn = ``;
            $("#chart_convert").empty().append(htmlBtn);
            document.getElementById("trends_btn").textContent = "TRENDS";
            document.getElementById("trends_btn").classList.remove("customback");

            $("#trends_div").show();
        }


        if (tabsName == 'HEART') {
            var html = ``;
            html += `<h6 class="ml-2 mt-2"><b style="font-weight: 500;color:#003266">${tabsName}</b></h6>`
            $("#activetabname").empty().append(html);
            var htmlBtn = ``;
            $("#chart_convert").empty().append(htmlBtn);
            document.getElementById("trends_btn").textContent = "TRENDS";
            document.getElementById("trends_btn").classList.remove("customback");

            $("#trends_div").show();
        }

        if (tabsName == 'Dealer-wise Ranking') {
            var html = ``;
            html += `<h6 class="ml-2 mt-2"><b style="font-weight: 500;color:#003266">${tabsName}</b></h6>`
            $("#activetabname").empty().append(html);

            subsTab8 += `<li class="nav-item nav-mob1"><a data-toggle="tab" href="#tab-eg8-18" class="active nav-link ash " style="border-radius:20px">Top Dealer NPS Score</a></li>`;
            subsTab8 += `<li class="nav-item nav-mob1"><a data-toggle="tab" href="#tab-eg8-19" class="nav-link ash " style="border-radius:20px">Top Dealer SSI Score</a></li>`;
            $("#subtabs8").empty().append(subsTab8);

            $("#trends_div").hide();
        }
        if (tabsName == 'Top Trending Topics') {
            var html = ``;
            html += `<h6 class="ml-2 mt-2"><b style="font-weight: 500;color:#003266">${tabsName}</b></h6>`
            $("#activetabname").empty().append(html);
            $("#trends_div").hide();
        }
        if (tabsName == 'Top Ratings') {
            var html = ``;
            html += `<h6 class="ml-2 mt-2"><b style="font-weight: 500;color:#003266">${tabsName}</b></h6>`
            $("#activetabname").empty().append(html);
            $("#trends_div").hide();
        }
        if (tabsName == 'Benchmark') {
            $("#tab-eg8-50").addClass("active");
            $("#tab-eg8-51").removeClass("active");

            var html = ``;
            html += `<h6 class="ml-2 mt-2"><b style="font-weight: 500;color:#003266">${tabsName}</b></h6>`
            $("#activetabname").empty().append(html);

            subsTab9 +=`<li class="nav-item nav-mob1"><a data-toggle="tab" href="#tab-eg8-50" class="active nav-link ash " style="border-radius:20px">NPS & SSI</a></li>`;
            subsTab9 +=`<li class="nav-item nav-mob1"><a data-toggle="tab" href="#tab-eg8-51" class="nav-link ash " style="border-radius:20px">Factor</a></li>`;
            $("#subtabs9").empty().append(subsTab9);
            $("#trends_div").hide();
        }
        if (tabsName == 'Customer Concerns') {
            var html = ``;
            html += `<h6 class="ml-2 mt-2"><b style="font-weight: 500;color:#003266">${tabsName}</b></h6>`
            $("#activetabname").empty().append(html);
            
            if(userType==1)
            {
                $("#cardsubtabs999").show();
                subsTab999 +=`<li class="nav-item nav-mob1"><a data-toggle="tab" href="#tab-eg8-403" class="active nav-link ash " style="border-radius:20px">Improvement Area-Dealer NPS</a></li>`;
                subsTab999 +=`<li class="nav-item nav-mob1"><a data-toggle="tab" href="#tab-eg8-404" class="nav-link ash " style="border-radius:20px">Improvement Area- Hyundai NPS</a></li>`; 
            }
            else
            {
                $("#cardsubtabs999").hide();
                subsTab999 += ``;
            }

            $("#subtabs999").empty().append(subsTab999);
            $("#trends_div").hide();
        }
        if (tabsName == 'Action Planning') {
            $("#tab-eg8-510").addClass("active");
            $("#tab-eg8-500").removeClass("active");


            var html = ``;
            html += `<h6 class="ml-2 mt-2"><b style="font-weight: 500;color:#003266">${tabsName}</b></h6>`
            $("#activetabname").empty().append(html);
			
			subsTab90 +=
                `<li class="nav-item nav-mob1"><a data-toggle="tab" href="#tab-eg8-510" class="active nav-link ash " style="border-radius:20px">Key Action Areas</a></li>`;
            subsTab90 +=
                `<li class="nav-item nav-mob1"><a data-toggle="tab" href="#tab-eg8-500" class="nav-link ash " style="border-radius:20px">Overall</a></li>`;

            
            $("#subtabs90").empty().append(subsTab90);
            $("#trends_div").hide();

            if(userType!=1)
            {
                var timeVal = $('#time option:selected').map(function(i, v) {
                return this.value;

                }).get();
                setTimeout(() => {
                    fortytwoAjax(datafortable, datafortable2, condX, timeVal);
                }, 4000);
                
            }
        }
        if (tabsName == 'Recordings') {
            var html = ``;
            html += `<h6 class="ml-2 mt-2"><b style="font-weight: 500;color:#003266">${tabsName}</b></h6>`
            $("#activetabname").empty().append(html);
            $("#trends_div").hide();
        }
        if (tabsName == 'User Log') {
            var html = ``;
            html += `<h6 class="ml-2 mt-2"><b style="font-weight: 500;color:#003266">${tabsName}</b></h6>`
            $("#activetabname").empty().append(html);
            $("#trends_div").hide();
        }
    });

    function trends(id) {
    var text = document.getElementById("trends_btn").textContent;
    if (tabsName == "Overall Performance") {
    if (text == "TRENDS") {
        $("ul.metismenu>li:last").addClass("mm-active");
        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:last").addClass("active");
        $("li.mm-active>ul.mm-collapse>li:last>a").attr("aria-expanded", "true");
        $('li.mm-active>ul.mm-collapse>li:last>a[aria-expanded="true"]').addClass("activelink");

        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:nth-child(1)").removeClass("active");
        $("li.mm-active>ul.mm-collapse>li:nth-child(1)>a").attr("aria-expanded", "false");
        $('li.mm-active>ul.mm-collapse>li:nth-child(1)>a[aria-expanded="false"]').removeClass("activelink");

        $('#tab-eg7-18').addClass("active");
        $('#tab-eg7-18').addClass("show");
        $('#tab-eg7-0').removeClass("active");
        $('#tab-eg7-0').removeClass("show");
        $("#overall_trend").show();
        $("#dizitization_trend").hide();
        $("#factor_trend").hide();
        $("#facility_trend").hide();
        $("#sales_trend").hide();
        $("#testdrive_trend").hide();
        $("#deal_trend").hide();
        $("#paperwork_trend").hide();
        $("#delivery_trend").hide();
        $("#heart_trend").hide();

        var htmlBtn = ``;
        // htmlBtn += `<button type="button" class="btn-transition btn btn-outline-primary btn-sm" style="margin-top:4px" id="overallConvert" onclick="overallConvertF();">Bar Chart</button>`;

        // htmlBtn += `<div class="switchbtn"><span class="tt">Line</span><label class="switch"><input type="checkbox" class="tchk" id="overallConvert" onchange="overallConvertF();"><span class="slider round"></span></label><span class="tt">Bar</span></div>`;
        $("#chart_convert").empty().append(htmlBtn);

        document.getElementById("trends_btn").textContent = "Go Back";
        document.getElementById("trends_btn").classList.add("customback");
    } else {
        $("ul.metismenu>li:last").removeClass("mm-active");
        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:last").removeClass("active");
        $("li.mm-active>ul.mm-collapse>li:last>a").attr("aria-expanded", "false");
        $('li.mm-active>ul.mm-collapse>li:last>a[aria-expanded="false"]').removeClass("activelink");

        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:nth-child(1)").addClass("active");
        $("li.mm-active>ul.mm-collapse>li:nth-child(1)>a").attr("aria-expanded", "true");
        $('li.mm-active>ul.mm-collapse>li:nth-child(1)>a[aria-expanded="true"]').addClass("activelink");

        $('#tab-eg7-18').removeClass("active");
        $('#tab-eg7-18').removeClass("show");
        $('#tab-eg7-0').addClass("active");
        $('#tab-eg7-0').addClass("show");
        $("#overall_trend").hide();
        $("#dizitization_trend").hide();
        $("#factor_trend").hide();
        $("#facility_trend").hide();
        $("#sales_trend").hide();
        $("#testdrive_trend").hide();
        $("#deal_trend").hide();
        $("#paperwork_trend").hide();
        $("#delivery_trend").hide();
        $("#heart_trend").hide();

        var htmlBtn = ``;
        // htmlBtn += `<button type="button" class="btn-transition btn btn-outline-primary btn-sm" style="margin-top:4px" id="overallConvert" onclick="overallConvertF();">Bar Chart</button>`;

        htmlBtn += ``;
        $("#chart_convert").empty().append(htmlBtn);

        document.getElementById("trends_btn").textContent = "TRENDS";
        document.getElementById("trends_btn").classList.remove("customback");
    }

}

if (tabsName == "Factors") {
    if (text == "TRENDS") {
        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:last").addClass("active");
        $("li.mm-active>ul.mm-collapse>li:last>a").attr("aria-expanded", "true");
        $('li.mm-active>ul.mm-collapse>li:last>a[aria-expanded="true"]').addClass("activelink");


        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:nth-child(2)").removeClass("active");
        $("li.mm-active>ul.mm-collapse>li:nth-child(2)>a").attr("aria-expanded", "false");
        $('li.mm-active>ul.mm-collapse>li:nth-child(2)>a[aria-expanded="false"]').removeClass("activelink");

        $('#tab-eg7-18').addClass("active");
        $('#tab-eg7-18').addClass("show");
        $('#tab-eg7-1').removeClass("active");
        $('#tab-eg7-1').removeClass("show");
        $("#overall_trend").hide();
        $("#dizitization_trend").hide();
        $("#factor_trend").show();
        $("#facility_trend").hide();
        $("#sales_trend").hide();
        $("#testdrive_trend").hide();
        $("#deal_trend").hide();
        $("#paperwork_trend").hide();
        $("#delivery_trend").hide();
        $("#heart_trend").hide();

        var htmlBtn = ``;
        //htmlBtn += `<button type="button" class="btn-transition btn btn-outline-primary btn-sm" style="margin-top:4px" id="factorConvert" onclick="factorConvertF();">Bar Chart</button>`;
        // htmlBtn += `<div class="switchbtn"><span class="tt">Line</span><label class="switch"><input type="checkbox" class="tchk"  ><span class="slider round"></span></label><span class="tt">Bar</span></div>`;
        $("#chart_convert").empty().append(htmlBtn);

        document.getElementById("trends_btn").textContent = "Go Back";
        document.getElementById("trends_btn").classList.add("customback");
    } else {
        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:last").removeClass("active");
        $("li.mm-active>ul.mm-collapse>li:last>a").attr("aria-expanded", "false");
        $('li.mm-active>ul.mm-collapse>li:last>a[aria-expanded="false"]').removeClass("activelink");


        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:nth-child(2)").addClass("active");
        $("li.mm-active>ul.mm-collapse>li:nth-child(2)>a").attr("aria-expanded", "true");
        $('li.mm-active>ul.mm-collapse>li:nth-child(2)>a[aria-expanded="true"]').addClass("activelink");

        $('#tab-eg7-18').removeClass("active");
        $('#tab-eg7-18').removeClass("show");
        $('#tab-eg7-1').addClass("active");
        $('#tab-eg7-1').addClass("show");
        $("#overall_trend").hide();
        $("#dizitization_trend").hide();
        $("#factor_trend").hide();
        $("#facility_trend").hide();
        $("#sales_trend").hide();
        $("#testdrive_trend").hide();
        $("#deal_trend").hide();
        $("#paperwork_trend").hide();
        $("#delivery_trend").hide();
        $("#heart_trend").hide();

        var htmlBtn = ``;
        //htmlBtn += `<button type="button" class="btn-transition btn btn-outline-primary btn-sm" style="margin-top:4px" id="factorConvert" onclick="factorConvertF();">Bar Chart</button>`;

        $("#chart_convert").empty().append(htmlBtn);

        document.getElementById("trends_btn").textContent = "TRENDS";
        document.getElementById("trends_btn").classList.remove("customback");
    }
}
// if(tabsName=="Factors Deep Dive")
// {
if (tabsName == "Digitization") {
    if (text == "TRENDS") {
        //ul.metismenu>li.pikachu>ul.mm-show>li.tb:nth-child(3)>ul.ash7>li.tb2:first>a
        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:last").addClass("active");
        $("li.mm-active>ul.mm-collapse>li:last>a").attr("aria-expanded", "true");
        $('li.mm-active>ul.mm-collapse>li:last>a[aria-expanded="true"]').addClass("activelink");

        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:nth-child(3)").removeClass("active");
        $("li.mm-active>ul.mm-collapse>li:nth-child(3)>a").attr("aria-expanded", "false");
        $('li.mm-active>ul.mm-collapse>li:nth-child(3)>a[aria-expanded="false"]').removeClass("activelink");

        $('#tab-eg7-18').addClass("active");
        $('#tab-eg7-18').addClass("show");
        $('#tab-eg7-2').removeClass("active");
        $('#tab-eg7-2').removeClass("show");
        $("#overall_trend").hide();
        $("#dizitization_trend").show();
        $("#factor_trend").hide();
        $("#facility_trend").hide();
        $("#sales_trend").hide();
        $("#testdrive_trend").hide();
        $("#deal_trend").hide();
        $("#paperwork_trend").hide();
        $("#delivery_trend").hide();
        $("#heart_trend").hide();

        var htmlBtn = ``;
        //htmlBtn += `<button type="button" class="btn-transition btn btn-outline-primary btn-sm" style="margin-top:4px" id="dizitizationConvert" onclick="dizitizationConvertF();">Bar Chart</button>`;
        // htmlBtn += `<div class="switchbtn"><span class="tt">Line</span><label class="switch"><input type="checkbox" class="tchk" id="dizitizationConvert" onchange="dizitizationConvertF();"><span class="slider round"></span></label><span class="tt">Bar</span></div>`;
        $("#chart_convert").empty().append(htmlBtn);

        document.getElementById("trends_btn").textContent = "Go Back";
        document.getElementById("trends_btn").classList.add("customback");
    } else {
        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:last").removeClass("active");
        $("li.mm-active>ul.mm-collapse>li:last>a").attr("aria-expanded", "false");
        $('li.mm-active>ul.mm-collapse>li:last>a[aria-expanded="false"]').removeClass("activelink");

        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:nth-child(3)").addClass("active");
        $("li.mm-active>ul.mm-collapse>li:nth-child(3)>a").attr("aria-expanded", "true");
        $('li.mm-active>ul.mm-collapse>li:nth-child(3)>a[aria-expanded="true"]').addClass("activelink");

        $('#tab-eg7-18').removeClass("active");
        $('#tab-eg7-18').removeClass("show");
        $('#tab-eg7-2').addClass("active");
        $('#tab-eg7-2').addClass("show");
        $("#overall_trend").hide();
        $("#dizitization_trend").hide();
        $("#factor_trend").hide();
        $("#facility_trend").hide();
        $("#sales_trend").hide();
        $("#testdrive_trend").hide();
        $("#deal_trend").hide();
        $("#paperwork_trend").hide();
        $("#delivery_trend").hide();
        $("#heart_trend").hide();

        var htmlBtn = ``;
        //htmlBtn += `<button type="button" class="btn-transition btn btn-outline-primary btn-sm" style="margin-top:4px" id="dizitizationConvert" onclick="dizitizationConvertF();">Bar Chart</button>`;

        $("#chart_convert").empty().append(htmlBtn);

        document.getElementById("trends_btn").textContent = "TRENDS";
        document.getElementById("trends_btn").classList.remove("customback");
    }
}
if (tabsName == "Facility") {
    if (text == "TRENDS") {
        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:last").addClass("active");
        $("li.mm-active>ul.mm-collapse>li:last>a").attr("aria-expanded", "true");
        $('li.mm-active>ul.mm-collapse>li:last>a[aria-expanded="true"]').addClass("activelink");


        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:nth-child(4)").removeClass("active");
        $("li.mm-active>ul.mm-collapse>li:nth-child(4)>a").attr("aria-expanded", "false");
        $('li.mm-active>ul.mm-collapse>li:nth-child(4)>a[aria-expanded="false"]').removeClass("activelink");

        $('#tab-eg7-18').addClass("active");
        $('#tab-eg7-18').addClass("show");
        $('#tab-eg7-3').removeClass("active");
        $('#tab-eg7-3').removeClass("show");
        $("#overall_trend").hide();
        $("#dizitization_trend").hide();
        $("#factor_trend").hide();
        $("#facility_trend").show();
        $("#sales_trend").hide();
        $("#testdrive_trend").hide();
        $("#deal_trend").hide();
        $("#paperwork_trend").hide();
        $("#delivery_trend").hide();
        $("#heart_trend").hide();

        var htmlBtn = ``;
        //htmlBtn += `<button type="button" class="btn-transition btn btn-outline-primary btn-sm" style="margin-top:4px" id="facilityConvert" onclick="facilityConvertF();">Bar Chart</button>`;
        // htmlBtn += `<div class="switchbtn"><span class="tt">Line</span><label class="switch"><input type="checkbox" class="tchk"  ><span class="slider round"></span></label><span class="tt">Bar</span></div>`;
        $("#chart_convert").empty().append(htmlBtn);

        document.getElementById("trends_btn").textContent = "Go Back";
        document.getElementById("trends_btn").classList.add("customback");
    } else {
        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:last").removeClass("active");
        $("li.mm-active>ul.mm-collapse>li:last>a").attr("aria-expanded", "false");
        $('li.mm-active>ul.mm-collapse>li:last>a[aria-expanded="false"]').removeClass("activelink");


        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:nth-child(4)").addClass("active");
        $("li.mm-active>ul.mm-collapse>li:nth-child(4)>a").attr("aria-expanded", "true");
        $('li.mm-active>ul.mm-collapse>li:nth-child(4)>a[aria-expanded="true"]').addClass("activelink");

        $('#tab-eg7-18').removeClass("active");
        $('#tab-eg7-18').removeClass("show");
        $('#tab-eg7-3').addClass("active");
        $('#tab-eg7-3').addClass("show");
        $("#overall_trend").hide();
        $("#dizitization_trend").hide();
        $("#factor_trend").hide();
        $("#facility_trend").hide();
        $("#sales_trend").hide();
        $("#testdrive_trend").hide();
        $("#deal_trend").hide();
        $("#paperwork_trend").hide();
        $("#delivery_trend").hide();
        $("#heart_trend").hide();

        var htmlBtn = ``;
        //htmlBtn += `<button type="button" class="btn-transition btn btn-outline-primary btn-sm" style="margin-top:4px" id="facilityConvert" onclick="facilityConvertF();">Bar Chart</button>`;

        $("#chart_convert").empty().append(htmlBtn);

        document.getElementById("trends_btn").textContent = "TRENDS";
        document.getElementById("trends_btn").classList.remove("customback");
    }


}
if (tabsName == "Sales Consultant") {
    if (text == "TRENDS") {
        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:last").addClass("active");
        $("li.mm-active>ul.mm-collapse>li:last>a").attr("aria-expanded", "true");
        $('li.mm-active>ul.mm-collapse>li:last>a[aria-expanded="true"]').addClass("activelink");


        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:nth-child(5)").removeClass("active");
        $("li.mm-active>ul.mm-collapse>li:nth-child(5)>a").attr("aria-expanded", "false");
        $('li.mm-active>ul.mm-collapse>li:nth-child(5)>a[aria-expanded="false"]').removeClass("activelink");

        $('#tab-eg7-18').addClass("active");
        $('#tab-eg7-18').addClass("show");
        $('#tab-eg7-4').removeClass("active");
        $('#tab-eg7-4').removeClass("show");
        $("#overall_trend").hide();
        $("#dizitization_trend").hide();
        $("#factor_trend").hide();
        $("#facility_trend").hide();
        $("#sales_trend").show();
        $("#testdrive_trend").hide();
        $("#deal_trend").hide();
        $("#paperwork_trend").hide();
        $("#delivery_trend").hide();
        $("#heart_trend").hide();

        var htmlBtn = ``;
        // htmlBtn += `<button type="button" class="btn-transition btn btn-outline-primary btn-sm" style="margin-top:4px" id="salesConvert" onclick="salesConvertF();">Bar Chart</button>`;
        // htmlBtn += `<div class="switchbtn"><span class="tt">Line</span><label class="switch"><input type="checkbox" class="tchk" id="salesConvert" onclick="salesConvertF();"><span class="slider round"></span></label><span class="tt">Bar</span></div>`;
        $("#chart_convert").empty().append(htmlBtn);

        document.getElementById("trends_btn").textContent = "Go Back";
        document.getElementById("trends_btn").classList.add("customback");

    } else {
        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:last").removeClass("active");
        $("li.mm-active>ul.mm-collapse>li:last>a").attr("aria-expanded", "false");
        $('li.mm-active>ul.mm-collapse>li:last>a[aria-expanded="false"]').removeClass("activelink");


        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:nth-child(5)").addClass("active");
        $("li.mm-active>ul.mm-collapse>li:nth-child(5)>a").attr("aria-expanded", "true");
        $('li.mm-active>ul.mm-collapse>li:nth-child(5)>a[aria-expanded="true"]').addClass("activelink");

        $('#tab-eg7-18').removeClass("active");
        $('#tab-eg7-18').removeClass("show");
        $('#tab-eg7-4').addClass("active");
        $('#tab-eg7-4').addClass("show");
        $("#overall_trend").hide();
        $("#dizitization_trend").hide();
        $("#factor_trend").hide();
        $("#facility_trend").hide();
        $("#sales_trend").hide();
        $("#testdrive_trend").hide();
        $("#deal_trend").hide();
        $("#paperwork_trend").hide();
        $("#delivery_trend").hide();
        $("#heart_trend").hide();

        var htmlBtn = ``;
        // htmlBtn += `<button type="button" class="btn-transition btn btn-outline-primary btn-sm" style="margin-top:4px" id="salesConvert" onclick="salesConvertF();">Bar Chart</button>`;
        //htmlBtn += `<div class="switchbtn"><span class="tt">Line</span><label class="switch"><input type="checkbox" class="tchk" id="salesConvert" onclick="salesConvertF();"><span class="slider round"></span></label><span class="tt">Bar</span></div>`;
        $("#chart_convert").empty().append(htmlBtn);

        document.getElementById("trends_btn").textContent = "TRENDS";
        document.getElementById("trends_btn").classList.remove("customback");
    }
}
if (tabsName == "Deal") {
    if (text == "TRENDS") {
        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:last").addClass("active");
        $("li.mm-active>ul.mm-collapse>li:last>a").attr("aria-expanded", "true");
        $('li.mm-active>ul.mm-collapse>li:last>a[aria-expanded="true"]').addClass("activelink");


        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:nth-child(6)").removeClass("active");
        $("li.mm-active>ul.mm-collapse>li:nth-child(6)>a").attr("aria-expanded", "false");
        $('li.mm-active>ul.mm-collapse>li:nth-child(6)>a[aria-expanded="false"]').removeClass("activelink");

        $('#tab-eg7-18').addClass("active");
        $('#tab-eg7-18').addClass("show");
        $('#tab-eg7-5').removeClass("active");
        $('#tab-eg7-5').removeClass("show");
        $("#overall_trend").hide();
        $("#dizitization_trend").hide();
        $("#factor_trend").hide();
        $("#facility_trend").hide();
        $("#sales_trend").hide();
        $("#testdrive_trend").hide();
        $("#deal_trend").show();
        $("#paperwork_trend").hide();
        $("#delivery_trend").hide();
        $("#heart_trend").hide();

        var htmlBtn = ``;
        //htmlBtn += `<button type="button" class="btn-transition btn btn-outline-primary btn-sm" style="margin-top:4px" id="dealConvert" onclick="dealConvertF();">Bar Chart</button>`;
        // htmlBtn += `<div class="switchbtn"><span class="tt">Line</span><label class="switch"><input type="checkbox" class="tchk" ><span class="slider round"></span></label><span class="tt">Bar</span></div>`;
        $("#chart_convert").empty().append(htmlBtn);

        document.getElementById("trends_btn").textContent = "Go Back";
        document.getElementById("trends_btn").classList.add("customback");
    } else {
        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:last").removeClass("active");
        $("li.mm-active>ul.mm-collapse>li:last>a").attr("aria-expanded", "false");
        $('li.mm-active>ul.mm-collapse>li:last>a[aria-expanded="false"]').removeClass("activelink");


        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:nth-child(6)").addClass("active");
        $("li.mm-active>ul.mm-collapse>li:nth-child(6)>a").attr("aria-expanded", "true");
        $('li.mm-active>ul.mm-collapse>li:nth-child(6)>a[aria-expanded="true"]').addClass("activelink");

        $('#tab-eg7-18').removeClass("active");
        $('#tab-eg7-18').removeClass("show");
        $('#tab-eg7-5').addClass("active");
        $('#tab-eg7-5').addClass("show");
        $("#overall_trend").hide();
        $("#dizitization_trend").hide();
        $("#factor_trend").hide();
        $("#facility_trend").hide();
        $("#sales_trend").hide();
        $("#testdrive_trend").hide();
        $("#deal_trend").hide();
        $("#paperwork_trend").hide();
        $("#delivery_trend").hide();
        $("#heart_trend").hide();

        var htmlBtn = ``;
        //htmlBtn += `<button type="button" class="btn-transition btn btn-outline-primary btn-sm" style="margin-top:4px" id="dealConvert" onclick="dealConvertF();">Bar Chart</button>`;
        // htmlBtn += `<div class="switchbtn"><span class="tt">Line</span><label class="switch"><input type="checkbox" class="tchk" id="dealConvert" onclick="dealConvertF();"><span class="slider round"></span></label><span class="tt">Bar</span></div>`;
        $("#chart_convert").empty().append(htmlBtn);

        document.getElementById("trends_btn").textContent = "TRENDS";
        document.getElementById("trends_btn").classList.remove("customback");
    }

}
if (tabsName == "Paperwork") {
    if (text == "TRENDS") {
        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:last").addClass("active");
        $("li.mm-active>ul.mm-collapse>li:last>a").attr("aria-expanded", "true");
        $('li.mm-active>ul.mm-collapse>li:last>a[aria-expanded="true"]').addClass("activelink");


        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:nth-child(7)").removeClass("active");
        $("li.mm-active>ul.mm-collapse>li:nth-child(7)>a").attr("aria-expanded", "false");
        $('li.mm-active>ul.mm-collapse>li:nth-child(7)>a[aria-expanded="false"]').removeClass("activelink");

        $('#tab-eg7-18').addClass("active");
        $('#tab-eg7-18').addClass("show");
        $('#tab-eg7-6').removeClass("active");
        $('#tab-eg7-6').removeClass("show");
        $("#overall_trend").hide();
        $("#dizitization_trend").hide();
        $("#factor_trend").hide();
        $("#facility_trend").hide();
        $("#sales_trend").hide();
        $("#testdrive_trend").hide();
        $("#deal_trend").hide();
        $("#paperwork_trend").show();
        $("#delivery_trend").hide();
        $("#heart_trend").hide();

        var htmlBtn = ``;
        //htmlBtn += `<button type="button" class="btn-transition btn btn-outline-primary btn-sm" style="margin-top:4px" id="paperConvert" onclick="paperConvertF();">Bar Chart</button>`;
        // htmlBtn += `<div class="switchbtn"><span class="tt">Line</span><label class="switch"><input type="checkbox" class="tchk" id="paperConvert" onclick="paperConvertF();"><span class="slider round"></span></label><span class="tt">Bar</span></div>`;
        $("#chart_convert").empty().append(htmlBtn);

        document.getElementById("trends_btn").textContent = "Go Back";
        document.getElementById("trends_btn").classList.add("customback");
    } else {
        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:last").removeClass("active");
        $("li.mm-active>ul.mm-collapse>li:last>a").attr("aria-expanded", "false");
        $('li.mm-active>ul.mm-collapse>li:last>a[aria-expanded="false"]').removeClass("activelink");


        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:nth-child(7)").addClass("active");
        $("li.mm-active>ul.mm-collapse>li:nth-child(7)>a").attr("aria-expanded", "true");
        $('li.mm-active>ul.mm-collapse>li:nth-child(7)>a[aria-expanded="true"]').addClass("activelink");

        $('#tab-eg7-18').removeClass("active");
        $('#tab-eg7-18').removeClass("show");
        $('#tab-eg7-6').addClass("active");
        $('#tab-eg7-6').addClass("show");
        $("#overall_trend").hide();
        $("#dizitization_trend").hide();
        $("#factor_trend").hide();
        $("#facility_trend").hide();
        $("#sales_trend").hide();
        $("#testdrive_trend").hide();
        $("#deal_trend").hide();
        $("#paperwork_trend").hide();
        $("#delivery_trend").hide();
        $("#heart_trend").hide();

        var htmlBtn = ``;
        //htmlBtn += `<button type="button" class="btn-transition btn btn-outline-primary btn-sm" style="margin-top:4px" id="paperConvert" onclick="paperConvertF();">Bar Chart</button>`;
        // htmlBtn += `<div class="switchbtn"><span class="tt">Line</span><label class="switch"><input type="checkbox" class="tchk" id="paperConvert" onclick="paperConvertF();"><span class="slider round"></span></label><span class="tt">Bar</span></div>`;
        $("#chart_convert").empty().append(htmlBtn);

        document.getElementById("trends_btn").textContent = "TRENDS";
        document.getElementById("trends_btn").classList.remove("customback");
    }


}
if (tabsName == "Delivery") {
    if (text == "TRENDS") {
        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:last").addClass("active");
        $("li.mm-active>ul.mm-collapse>li:last>a").attr("aria-expanded", "true");
        $('li.mm-active>ul.mm-collapse>li:last>a[aria-expanded="true"]').addClass("activelink");


        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:nth-child(8)").removeClass("active");
        $("li.mm-active>ul.mm-collapse>li:nth-child(8)>a").attr("aria-expanded", "false");
        $('li.mm-active>ul.mm-collapse>li:nth-child(8)>a[aria-expanded="false"]').removeClass("activelink");

        $('#tab-eg7-18').addClass("active");
        $('#tab-eg7-18').addClass("show");
        $('#tab-eg7-7').removeClass("active");
        $('#tab-eg7-7').removeClass("show");
        $("#overall_trend").hide();
        $("#dizitization_trend").hide();
        $("#factor_trend").hide();
        $("#facility_trend").hide();
        $("#sales_trend").hide();
        $("#testdrive_trend").hide();
        $("#deal_trend").hide();
        $("#paperwork_trend").hide();
        $("#delivery_trend").show();
        $("#heart_trend").hide();

        var htmlBtn = ``;
        //htmlBtn += `<button type="button" class="btn-transition btn btn-outline-primary btn-sm" style="margin-top:4px" id="deliveryConvert" onclick="deliveryConvertF();">Bar Chart</button>`;
        // htmlBtn += `<div class="switchbtn"><span class="tt">Line</span><label class="switch"><input type="checkbox" class="tchk" id="deliveryConvert" onclick="deliveryConvertF();"><span class="slider round"></span></label><span class="tt">Bar</span></div>`;
        $("#chart_convert").empty().append(htmlBtn);

        document.getElementById("trends_btn").textContent = "Go Back";
        document.getElementById("trends_btn").classList.add("customback");

    } else {
        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:last").removeClass("active");
        $("li.mm-active>ul.mm-collapse>li:last>a").attr("aria-expanded", "false");
        $('li.mm-active>ul.mm-collapse>li:last>a[aria-expanded="false"]').removeClass("activelink");


        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:nth-child(8)").addClass("active");
        $("li.mm-active>ul.mm-collapse>li:nth-child(8)>a").attr("aria-expanded", "true");
        $('li.mm-active>ul.mm-collapse>li:nth-child(8)>a[aria-expanded="true"]').addClass("activelink");

        $('#tab-eg7-18').removeClass("active");
        $('#tab-eg7-18').removeClass("show");
        $('#tab-eg7-7').addClass("active");
        $('#tab-eg7-7').addClass("show");
        $("#overall_trend").hide();
        $("#dizitization_trend").hide();
        $("#factor_trend").hide();
        $("#facility_trend").hide();
        $("#sales_trend").hide();
        $("#testdrive_trend").hide();
        $("#deal_trend").hide();
        $("#paperwork_trend").hide();
        $("#delivery_trend").hide();
        $("#heart_trend").hide();

        var htmlBtn = ``;
        //htmlBtn += `<button type="button" class="btn-transition btn btn-outline-primary btn-sm" style="margin-top:4px" id="deliveryConvert" onclick="deliveryConvertF();">Bar Chart</button>`;
        // htmlBtn += `<div class="switchbtn"><span class="tt">Line</span><label class="switch"><input type="checkbox" class="tchk" id="deliveryConvert" onclick="deliveryConvertF();"><span class="slider round"></span></label><span class="tt">Bar</span></div>`;
        $("#chart_convert").empty().append(htmlBtn);

        document.getElementById("trends_btn").textContent = "TRENDS";
        document.getElementById("trends_btn").classList.remove("customback");
    }


}



if (tabsName == "HEART") {
    if (text == "TRENDS") {
        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:last").addClass("active");
        $("li.mm-active>ul.mm-collapse>li:last>a").attr("aria-expanded", "true");
        $('li.mm-active>ul.mm-collapse>li:last>a[aria-expanded="true"]').addClass("activelink");


        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:nth-child(9)").removeClass("active");
        $("li.mm-active>ul.mm-collapse>li:nth-child(9)>a").attr("aria-expanded", "false");
        $('li.mm-active>ul.mm-collapse>li:nth-child(9)>a[aria-expanded="false"]').removeClass("activelink");

        $('#tab-eg7-18').addClass("active");
        $('#tab-eg7-18').addClass("show");
        $('#tab-eg7-8').removeClass("active");
        $('#tab-eg7-8').removeClass("show");
        $("#overall_trend").hide();
        $("#dizitization_trend").hide();
        $("#factor_trend").hide();
        $("#facility_trend").hide();
        $("#sales_trend").hide();
        $("#testdrive_trend").hide();
        $("#deal_trend").hide();
        $("#paperwork_trend").hide();
        $("#delivery_trend").hide();
        $("#heart_trend").show();

        var htmlBtn = ``;
        //htmlBtn += `<button type="button" class="btn-transition btn btn-outline-primary btn-sm" style="margin-top:4px" id="heartConvert" onclick="heartConvertF();">Bar Chart</button>`;
        // htmlBtn += `<div class="switchbtn"><span class="tt">Line</span><label class="switch"><input type="checkbox" class="tchk"><span class="slider round"></span></label><span class="tt">Bar</span></div>`;
        $("#chart_convert").empty().append(htmlBtn);

        document.getElementById("trends_btn").textContent = "Go Back";
        document.getElementById("trends_btn").classList.add("customback");
    } else {
        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:last").removeClass("active");
        $("li.mm-active>ul.mm-collapse>li:last>a").attr("aria-expanded", "false");
        $('li.mm-active>ul.mm-collapse>li:last>a[aria-expanded="false"]').removeClass("activelink");


        $("ul.metismenu>li.mm-active>a").css('background-color', '#ffffff');
        $("li.mm-active>ul.mm-collapse>li:nth-child(9)").addClass("active");
        $("li.mm-active>ul.mm-collapse>li:nth-child(9)>a").attr("aria-expanded", "true");
        $('li.mm-active>ul.mm-collapse>li:nth-child(9)>a[aria-expanded="true"]').addClass("activelink");

        $('#tab-eg7-18').removeClass("active");
        $('#tab-eg7-18').removeClass("show");
        $('#tab-eg7-8').addClass("active");
        $('#tab-eg7-8').addClass("show");
        $("#overall_trend").hide();
        $("#dizitization_trend").hide();
        $("#factor_trend").hide();
        $("#facility_trend").hide();
        $("#sales_trend").hide();
        $("#testdrive_trend").hide();
        $("#deal_trend").hide();
        $("#paperwork_trend").hide();
        $("#delivery_trend").hide();
        $("#heart_trend").hide();

        var htmlBtn = ``;
        //htmlBtn += `<button type="button" class="btn-transition btn btn-outline-primary btn-sm" style="margin-top:4px" id="heartConvert" onclick="heartConvertF();">Bar Chart</button>`;
        // htmlBtn += `<div class="switchbtn"><span class="tt">Line</span><label class="switch"><input type="checkbox" class="tchk" id="heartConvert" onclick="heartConvertF();"><span class="slider round"></span></label><span class="tt">Bar</span></div>`;
        $("#chart_convert").empty().append(htmlBtn);

        document.getElementById("trends_btn").textContent = "TRENDS";
        document.getElementById("trends_btn").classList.remove("customback");
    }


}
}
    //=================================Trends Concept Ends============================================
    function maindealerLogicF() {
        var val = $("#maindealer").val();
        if (val != 0) {
            $("#stateField").hide();
            $("#cityField").hide();

        } else {
            $("#stateField").show();
            $("#cityField").show();

        }

    }

    function stateLogicF() {
        var stateLengthY = $("#state option:selected").length;


        if (stateLengthY == 0) {
            $("#maindealerField").show();
            $("#dealerField").show();

        } else {
            $("#maindealerField").hide();
            $("#dealerField").hide();

        }

    }
    //=================================Chart conversion Start============================================
    function ssiConvertF() {
        const btnT = document.getElementById("ssiConvert");
        if (btnT.checked) {
            $("#ssiline_card").hide();
            $("#ssibar_card").show();

            // btnT.textContent = 'Trend';
        } else {
            $("#ssiline_card").show();
            $("#ssibar_card").hide();

            //   btnT.textContent = 'Bar Chart';
        }
    }

    function facilityQ17bConvertF() {
        const btnT = document.getElementById("facilityQ17bConvert");
        if (btnT.checked) {
            $("#facilityQ17bline_card2").hide();
            $("#facilityQ17bar_card2").show();

            // btnT.textContent = 'Trend';
        } else {
            $("#facilityQ17bline_card2").show();
            $("#facilityQ17bar_card2").hide();

            //   btnT.textContent = 'Bar Chart';
        }
    }

    function hyundainpsConvertF() {
        const btnT = document.getElementById("hyundainpsConvert");
        if (btnT.checked) {
            $("#q5line_card").hide();
            $("#q5bar_card").show();

            // btnT.textContent = 'Trend';
        } else {
            $("#q5line_card").show();
            $("#q5bar_card").hide();

            //   btnT.textContent = 'Bar Chart';
        }
    }

    function hyundaipreConvertF() {
        const btnT = document.getElementById("hyundaipreConvert");
        if (btnT.checked) {
            $("#q4line_card").hide();
            $("#q4bar_card").show();

            // btnT.textContent = 'Trend';
        } else {
            $("#q4line_card").show();
            $("#q4bar_card").hide();

            //   btnT.textContent = 'Bar Chart';
        }
    }

    function dealernpsConvertF() {
        const btnT = document.getElementById("dealernpsConvert");
        if (btnT.checked) {
            $("#q9line_card").hide();
            $("#q9bar_card").show();

            // btnT.textContent = 'Trend';
        } else {
            $("#q9line_card").show();
            $("#q9bar_card").hide();

            //   btnT.textContent = 'Bar Chart';
        }
    }

    function dealerpreConvertF() {
        const btnT = document.getElementById("dealerpreConvert");
        if (btnT.checked) {
            $("#q8line_card").hide();
            $("#q8bar_card").show();

            // btnT.textContent = 'Trend';
        } else {
            $("#q8line_card").show();
            $("#q8bar_card").hide();

            //   btnT.textContent = 'Bar Chart';
        }
    }

    function zoneConvertF() {
        const btnT = document.getElementById("zoneConvert");
        if (btnT.checked) {
            $("#zoneline_card").hide();
            $("#zonebar_card").show();

            // btnT.textContent = 'Trend';
        } else {
            $("#zoneline_card").show();
            $("#zonebar_card").hide();

            //   btnT.textContent = 'Bar Chart';
        }
    }

    function zoneConvertF2() {
        const btnT = document.getElementById("zoneConvert2");
        if (btnT.checked) {
            $("#zoneline_card2").hide();
            $("#zonebar_card2").show();

            // btnT.textContent = 'Trend';
        } else {
            $("#zoneline_card2").show();
            $("#zonebar_card2").hide();

            //   btnT.textContent = 'Bar Chart';
        }
    }

    function regionConvertF() {
        const btnT = document.getElementById("regionConvert");
        if (btnT.checked) {
            $("#regionline_card").hide();
            $("#regionbar_card").show();

            // btnT.textContent = 'Trend';
        } else {
            $("#regionline_card").show();
            $("#regionbar_card").hide();

            //   btnT.textContent = 'Bar Chart';
        }
    }

    function regionConvertF2() {
        const btnT = document.getElementById("regionConvert2");
        if (btnT.checked) {
            $("#regionline_card2").hide();
            $("#regionbar_card2").show();

            // btnT.textContent = 'Trend';
        } else {
            $("#regionline_card2").show();
            $("#regionbar_card2").hide();

            //   btnT.textContent = 'Bar Chart';
        }
    }

    function overallhyundaiwebConvertF() {
        const btnT = document.getElementById("overallhyundaiwebConvert");
        if (btnT.checked) {
            $("#overallhyundailine_card").hide();
            $("#overallhyundaibar_card").show();
        } else {
            $("#overallhyundailine_card").show();
            $("#overallhyundaibar_card").hide();
        }
    }

    function hyundaiwebConvertF() {
        const btnT = document.getElementById("hyundaiwebConvert");
        if (btnT.checked) {
            $("#hyundailine_card").hide();
            $("#hyundaibar_card").show();

            // btnT.textContent = 'Trend';
        } else {
            $("#hyundailine_card").show();
            $("#hyundaibar_card").hide();

            //   btnT.textContent = 'Bar Chart';
        }
    }

    function ctbwebConvertF() {
        const btnT = document.getElementById("ctbwebConvert");
        if (btnT.checked) {
            $("#ctbline_card").hide();
            $("#ctbbar_card").show();

            // btnT.textContent = 'Trend';
        } else {
            $("#ctbline_card").show();
            $("#ctbbar_card").hide();

            //   btnT.textContent = 'Bar Chart';
        }
    }

    function factorConvertF() {
        const btnT = document.getElementById("factorConvert");
        if (btnT.checked) {
            $("#factorline_card").hide();
            $("#factorbar_card").show();


        } else {
            $("#factorline_card").show();
            $("#factorbar_card").hide();


        }
    }

    function facilityoverallConvertF() {
        const btnT = document.getElementById("facilityoverallConvert");

        if (btnT.checked) {
            $("#facilityoverallline_card").hide();
            $("#facilityoverallbar_card").show();


        } else {
            $("#facilityoverallline_card").show();
            $("#facilityoverallbar_card").hide();


        }
    }

    function facilityConvertF() {
        const btnT = document.getElementById("facilityConvert");

        if (btnT.checked) {
            $("#facilityline_card").hide();
            $("#facilitybar_card").show();


        } else {
            $("#facilityline_card").show();
            $("#facilitybar_card").hide();


        }
    }

    function salesoverallConvertF() {
        const btnT = document.getElementById("salesoverallConvert");

        if (btnT.checked) {
            $("#salesoverallline_card").hide();
            $("#salesoverallbar_card").show();


        } else {
            $("#salesoverallline_card").show();
            $("#salesoverallbar_card").hide();


        }
    }

    function salesyesConvertF() {
        const btnT = document.getElementById("salesyesConvert");

        if (btnT.checked) {
            $("#salesyesline_card").hide();
            $("#salesyesbar_card").show();


        } else {
            $("#salesyesline_card").show();
            $("#salesyesbar_card").hide();


        }
    }

    function democarConvertF() {
        const btnT = document.getElementById("democarConvert");

        if (btnT.checked) {
            $("#democarline_card").hide();
            $("#democarbar_card").show();


        } else {
            $("#democarline_card").show();
            $("#democarbar_card").hide();


        }
    }

    function salesnoConvertF() {
        const btnT = document.getElementById("salesnoConvert");

        if (btnT.checked) {
            $("#salesnoline_card").hide();
            $("#salesnobar_card").show();


        } else {
            $("#salesnoline_card").show();
            $("#salesnobar_card").hide();


        }
    }

    function q19ConvertF() {
        const btnT = document.getElementById("q19Convert");

        if (btnT.checked) {
            $("#q19line_card").hide();
            $("#q19bar_card").show();


        } else {
            $("#q19line_card").show();
            $("#q19bar_card").hide();


        }
    }

    function driveexpConvertF() {
        const btnT = document.getElementById("driveexpConvert");

        if (btnT.checked) {
            $("#driveexpline_card").hide();
            $("#driveexpbar_card").show();


        } else {
            $("#driveexpline_card").show();
            $("#driveexpbar_card").hide();


        }
    }

    function drivedealerConvertF() {
        const btnT = document.getElementById("drivedealerConvert");

        if (btnT.checked) {
            $("#drivedealerline_card").hide();
            $("#drivedealerbar_card").show();


        } else {
            $("#drivedealerline_card").show();
            $("#drivedealerbar_card").hide();


        }
    }

    function drivereasonConvertF() {
        const btnT = document.getElementById("drivereasonConvert");

        if (btnT.checked) {
            $("#drivereasonline_card").hide();
            $("#drivereasonbar_card").show();


        } else {
            $("#drivereasonline_card").show();
            $("#drivereasonbar_card").hide();


        }
    }

    function dealoverallConvertF() {
        const btnT = document.getElementById("dealoverallConvert");

        if (btnT.checked) {
            $("#dealoverallline_card").hide();
            $("#dealoverallbar_card").show();




        } else {
            $("#dealoverallline_card").show();
            $("#dealoverallbar_card").hide();



        }
    }

    function q24ConvertF() {
        const btnT = document.getElementById("q24Convert");

        if (btnT.checked) {
            $("#q24line_card").hide();
            $("#q24bar_card").show();




        } else {
            $("#q24line_card").show();
            $("#q24bar_card").hide();



        }
    }

    function dealConvertF() {
        const btnT = document.getElementById("dealConvert");

        if (btnT.checked) {
            $("#dealline_card").hide();
            $("#dealbar_card").show();




        } else {
            $("#dealline_card").show();
            $("#dealbar_card").hide();



        }
    }

    function paperoverallConvertF() {
        const btnT = document.getElementById("paperoverallConvert");

        if (btnT.checked) {
            $("#paperoverallline_card").hide();
            $("#paperoverallbar_card").show();




        } else {
            $("#paperoverallline_card").show();
            $("#paperoverallbar_card").hide();



        }
    }

    function paperexpConvertF() {
        const btnT = document.getElementById("paperexpConvert");

        if (btnT.checked) {
            $("#paperexpline_card").hide();
            $("#paperexpbar_card").show();




        } else {
            $("#paperexpline_card").show();
            $("#paperexpbar_card").hide();



        }
    }

    function deliverynewConvertF() {
        const btnT = document.getElementById("deliverynewConvert");

        if (btnT.checked) {
            $("#deliverynewline_card").hide();
            $("#deliverynewbar_card").show();




        } else {
            $("#deliverynewline_card").show();
            $("#deliverynewbar_card").hide();



        }
    }

    function papertimeConvertF() {
        const btnT = document.getElementById("papertimeConvert");

        if (btnT.checked) {
            $("#papertimeline_card").hide();
            $("#papertimebar_card").show();




        } else {
            $("#papertimeline_card").show();
            $("#papertimebar_card").hide();



        }
    }

    function paperprocessConvertF() {
        const btnT = document.getElementById("paperprocessConvert");

        if (btnT.checked) {
            $("#paperprocessline_card").hide();
            $("#paperprocessbar_card").show();




        } else {
            $("#paperprocessline_card").show();
            $("#paperprocessbar_card").hide();



        }
    }

    function paperdiagnosConvertF() {
        const btnT = document.getElementById("paperdiagnosConvert");

        if (btnT.checked) {
            $("#paperdiagnosline_card").hide();
            $("#paperdiagnosbar_card").show();




        } else {
            $("#paperdiagnosline_card").show();
            $("#paperdiagnosbar_card").hide();



        }
    }

    function deliverycondConvertF() {
        const btnT = document.getElementById("deliverycondConvert");

        if (btnT.checked) {
            $("#deliverycondline_card").hide();
            $("#deliverycondbar_card").show();




        } else {
            $("#deliverycondline_card").show();
            $("#deliverycondbar_card").hide();



        }
    }

    function deliveryqualityConvertF() {
        const btnT = document.getElementById("deliveryqualityConvert");

        if (btnT.checked) {
            $("#deliveryqualityline_card").hide();
            $("#deliveryqualitybar_card").show();




        } else {
            $("#deliveryqualityline_card").show();
            $("#deliveryqualitybar_card").hide();



        }
    }

    function deliverytimeConvertF() {
        const btnT = document.getElementById("deliverytimeConvert");

        if (btnT.checked) {
            $("#deliverytimeline_card").hide();
            $("#deliverytimebar_card").show();




        } else {
            $("#deliverytimeline_card").show();
            $("#deliverytimebar_card").hide();



        }
    }

    function deliveryoverallConvertF() {
        const btnT = document.getElementById("deliveryoverallConvert");

        if (btnT.checked) {
            $("#deliveryoverallline_card").hide();
            $("#deliveryoverallbar_card").show();




        } else {
            $("#deliveryoverallline_card").show();
            $("#deliveryoverallbar_card").hide();



        }
    }

    function deliveryserviceConvertF() {
        const btnT = document.getElementById("deliveryserviceConvert");

        if (btnT.checked) {
            $("#deliveryserviceline_card").hide();
            $("#deliveryservicebar_card").show();




        } else {
            $("#deliveryserviceline_card").show();
            $("#deliveryservicebar_card").hide();



        }
    }

    function deliverydiagnosConvertF() {
        const btnT = document.getElementById("deliverydiagnosConvert");

        if (btnT.checked) {
            $("#deliverydiagnosline_card").hide();
            $("#deliverydiagnosbar_card").show();




        } else {
            $("#deliverydiagnosline_card").show();
            $("#deliverydiagnosbar_card").hide();



        }
    }

    function heartConvertF() {
        const btnT = document.getElementById("heartConvert");

        if (btnT.checked) {
            $("#heartline_card").hide();
            $("#heartbar_card").show();




        } else {
            $("#heartline_card").show();
            $("#heartbar_card").hide();




        }
    }

    //===============================================EXPORT EXCEL=============================================
    function exportExcel(id)
    {
        var btnId = id;
        console.log(btnId);
        if(btnId=='Overall_Excel')
        {
            let table1 = document.getElementById("tblOver");
            let book = TableToExcel.tableToBook(table1, {
                sheet: {
                    name: "Overall Data"
                }
            });
            TableToExcel.save(book, "DasboardData.xlsx");
        }
        if(btnId=='ActionOverall')
        {
            //debugger;
            var zoneLengthY = $("#zone option:selected").length;
            var cityLengthY = $("#city option:selected").length;
            var stateLengthY = $("#state option:selected").length;
            var zoneLengthY = $("#zone option:selected").length;
            var regionLengthY = $("#region option:selected").length;
            var maindealerVal = $('#maindealer').val();
            var dealerVal = $('#dealer').val();
            if (zoneLengthY != 0) {
                $("#err_msg1").hide();
                let table1 = document.getElementById("allT");
                let book = TableToExcel.tableToBook(table1, {
                    sheet: {
                        name: "Overall Data"
                    }
                });

                TableToExcel.save(book, "Overall.xlsx");
            } else if (zoneLengthY != 0) {
                $("#err_msg1").hide();
                let table1 = document.getElementById("allT");
                let book = TableToExcel.tableToBook(table1, {
                    sheet: {
                        name: "Overall Data"
                    }
                });
                TableToExcel.save(book, "Overall.xlsx");
            } else {
                $("#err_msg1").show();
                console.log("Please select");
            }
        }
        if(btnId=='KeyOverall')
        {
            var zoneLengthY = $("#zone option:selected").length;
            var cityLengthY = $("#city option:selected").length;
            var stateLengthY = $("#state option:selected").length;
            var zoneLengthY = $("#zone option:selected").length;
            var regionLengthY = $("#region option:selected").length;
            var maindealerVal = $('#maindealer').val();
            var dealerVal = $('#dealer').val();
            if (zoneLengthY != 0) {
                $("#err_msg2").hide();
                let table1 = document.getElementById("allT2");
                let book = TableToExcel.tableToBook(table1, {
                    sheet: {
                        name: "Key Data"
                    }
                });

                TableToExcel.save(book, "Key_action.xlsx");
            } else if (zoneLengthY != 0) {
                $("#err_msg2").hide();
                let table1 = document.getElementById("allT");
                let book = TableToExcel.tableToBook(table1, {
                    sheet: {
                        name: "Key Data"
                    }
                });
                TableToExcel.save(book, "Key_action.xlsx");
            } else {
                $("#err_msg2").show();
                console.log("Please select");
            }

        }
        if(btnId=='UserLog')
        {
            let table1 = document.getElementById("Ulog_table");
            let book = TableToExcel.tableToBook(table1, {
                sheet: {
                    name: "User login"
                }
            });
            TableToExcel.save(book, "User login details.xlsx");
        }
        if(btnId=='ActionLog')
        {
            let table1 = document.getElementById("Alog_table");
            let book = TableToExcel.tableToBook(table1, {
                sheet: {
                    name: "Action login"
                }
            });
            TableToExcel.save(book, "Action login details.xlsx");
        }
        if(btnId=='overalluseruploadfile')
        {
            let table1 = document.getElementById("Aupload_table");
            let book = TableToExcel.tableToBook(table1, {
                sheet: {
                    name: "Action Overall"
                }
            });
            TableToExcel.save(book, "Action Overall.xlsx");
        }
        if(btnId=='keyuseruploadfile')
        {
            let table1 = document.getElementById("Kupload_table");
            let book = TableToExcel.tableToBook(table1, {
                sheet: {
                    name: "Action Key"
                }
            });
            TableToExcel.save(book, "Action Key.xlsx");
        }
    }
    //===============================================EXPORT EXCEL=============================================
    function overallConvertF() {
        const btnT = document.getElementById("overallConvert");
        if (btnT.checked) {
            $("#ssiline_card").hide();
            $("#ssibar_card").show();
            $("#q5line_card").hide();
            $("#q5bar_card").show();
            $("#q4line_card").hide();
            $("#q4bar_card").show();
            $("#q9line_card").hide();
            $("#q9bar_card").show();
            $("#q8line_card").hide();
            $("#q8bar_card").show();
            // btnT.textContent = 'Trend';
        } else {
            $("#ssiline_card").show();
            $("#ssibar_card").hide();
            $("#q5line_card").show();
            $("#q5bar_card").hide();
            $("#q4line_card").show();
            $("#q4bar_card").hide();
            $("#q9line_card").show();
            $("#q9bar_card").hide();
            $("#q8line_card").show();
            $("#q8bar_card").hide();
            //   btnT.textContent = 'Bar Chart';
        }
    }

    function dizitizationConvertF() {
        const btnT = document.getElementById("dizitizationConvert");
        if (btnT.checked) {
            $("#hyundailine_card").hide();
            $("#hyundaibar_card").show();
            $("#ctbline_card").hide();
            $("#ctbbar_card").show();

        } else {
            $("#hyundailine_card").show();
            $("#hyundaibar_card").hide();
            $("#ctbline_card").show();
            $("#ctbbar_card").hide();

        }
    }

    function salesConvertF() {
        const btnT = document.getElementById("salesConvert");

        if (btnT.checked) {
            $("#salesyesline_card").hide();
            $("#salesyesbar_card").show();
            $("#salesnoline_card").hide();
            $("#salesnobar_card").show();


        } else {
            $("#salesyesline_card").show();
            $("#salesyesbar_card").hide();
            $("#salesnoline_card").hide();
            $("#salesnobar_card").show();


        }
    }

    function testConvertF() {
        const btnT = document.getElementById("testdriveConvert");

        if (btnT.checked) {
            $("#driveexpline_card").hide();
            $("#driveexpbar_card").show();
            $("#drivedealerline_card").hide();
            $("#drivedealerbar_card").show();
            $("#drivereasonline_card").hide();
            $("#drivereasonbar_card").show();



        } else {
            $("#driveexpline_card").show();
            $("#driveexpbar_card").hide();
            $("#drivedealerline_card").show();
            $("#drivedealerbar_card").hide();
            $("#drivereasonline_card").show();
            $("#drivereasonbar_card").hide();



        }
    }



    function paperConvertF() {
        const btnT = document.getElementById("paperConvert");

        if (btnT.checked) {
            $("#papertimeline_card").hide();
            $("#papertimebar_card").show();

            $("#paperprocessline_card").hide();
            $("#paperprocessbar_card").show();

            $("#paperdiagnosline_card").hide();
            $("#paperdiagnosbar_card").show();


        } else {
            $("#papertimeline_card").show();
            $("#papertimebar_card").hide();

            $("#paperprocessline_card").show();
            $("#paperprocessbar_card").hide();

            $("#paperdiagnosline_card").show();
            $("#paperdiagnosbar_card").hide();


        }
    }

    function deliveryConvertF() {
        const btnT = document.getElementById("deliveryConvert");

        if (btnT.checked) {
            $("#deliverycondline_card").hide();
            $("#deliverycondbar_card").show();

            $("#deliveryqualityline_card").hide();
            $("#deliveryqualitybar_card").show();

            $("#deliverytimeline_card").hide();
            $("#deliverytimebar_card").show();

            $("#deliveryserviceline_card").hide();
            $("#deliveryservicebar_card").show();

            $("#deliverydiagnosline_card").hide();
            $("#deliverydiagnosbar_card").show();


        } else {
            $("#deliverycondline_card").show();
            $("#deliverycondbar_card").hide();

            $("#deliveryqualityline_card").show();
            $("#deliveryqualitybar_card").hide();

            $("#deliverytimeline_card").show();
            $("#deliverytimebar_card").hide();

            $("#deliveryserviceline_card").show();
            $("#deliveryservicebar_card").hide();

            $("#deliverydiagnosline_card").show();
            $("#deliverydiagnosbar_card").hide();


        }
    }

    function tableConvertF() {
        const btnT = document.getElementById("tableConvert");
        if (btnT.checked) {
            $("#50T").hide();
            $("#100T").show();
        } else {
            $("#50T").show();
            $("#100T").hide();
        }
    }


    //=================================Chart conversion End============================================

    //=================================Drodpown Start============================================
    $(".js-select2").each(function() {
        $(this).select2({
            minimumResultsForSearch: 20,
            dropdownParent: $(this).next('.dropDownSelect2')
        });
        $(".js-select2").each(function() {
            $(this).on('select2:close', function(e) {
                if ($(this).val() == "Please chooses") {
                    $('.js-show-service').slideUp();
                } else {
                    $('.js-show-service').slideUp();
                    $('.js-show-service').slideDown();
                }
            });
        });
    });
    //=================================Drodpown Ends============================================
    //=================================Apply Filter Starts============================================
    function applyF(shL) {
        tablecondX = ``;
        window.stop();
        console.log("shL=>" + shL);
        //datafortable = [];
        datafortable2 = [];
        timeText = [];
        var timeVal = $('#time option:selected').map(function(i, v) {
            timeText.push($(this).attr("data-name"));
            return this.value;

        }).get();
        console.log(timeVal);
       
        
        
        //////debugger;
        $('.splash').show();

        open();
        closeF();

        var cityLengthY = $("#city option:selected").length;
        var stateLengthY = $("#state option:selected").length;
        var zoneLengthY = $("#zone option:selected").length;
        var regionLengthY = $("#region option:selected").length;

        if (zoneLengthY == 0) {
            conX = '1';
        } else {
            conX = '2';
        }
        
        var cityVal = $('#city option:selected').map(function(i, v) {
            return this.value;
        }).get();
        var stateVal = $('#state option:selected').map(function(i, v) {
            return this.value;
        }).get();
        var zoneVal = $('#zone option:selected').map(function(i, v) {
            return this.value;
        }).get();
        var regionVal = $('#region option:selected').map(function(i, v) {
            return this.value;
        }).get();
        var maindealerVal = $('#maindealer').val();

        var dealerVal = $('#dealer').val();

        


        var cityValX = cityVal.map(function(value) {
            return `'${value}'`;
        }).join(',');
        var stateValX = stateVal.map(function(value) {
            return `'${value}'`;
        }).join(',');
        var zoneValX = zoneVal.map(function(value) {
            return `'${value}'`;
        }).join(',');
        var regionValX = regionVal.map(function(value) {
            return `'${value}'`;
        }).join(',');

        if (conX == 2) {
            tablecondX = ``;
            condX = ``;
            conddealerX = ``;
            filtercondX = ``;
            filtercondX += `<b>Filters:</b> `;
            filtercondX += `<b>Time Period</b> IN (${timeText}) `;
            filtercondX2 = ``;
            filtercondX2 += `<b>Filters:</b> `;
            filtercondX2 += `Time Period IN (${timeText}) `;
            if (zoneLengthY != 0) {
                condX += `Zone IN (${zoneValX}) AND `;
                conddealerX += `Zone IN (${zoneValX}) AND `;
                filtercondX += `<b>Zone</b> IN (${zoneVal}) `;
                filtercondX2 += `Zone IN (${zoneVal}) `;
                tablecondX += `Zone`;
                $("#benchzone_card").show();
                $("#benchzonef_card").show();
                $("#benchindia_card").removeClass("col-lg-12");
                $("#benchindia_card").addClass("col-lg-6");
                $("#benchzone_card").removeClass("col-lg-3");
                $("#benchzone_card").addClass("col-lg-6");

                $("#benchindiaf_card").removeClass("col-lg-12");
                $("#benchindiaf_card").addClass("col-lg-6");
                $("#benchzonef_card").removeClass("col-lg-3");
                $("#benchzonef_card").addClass("col-lg-6");
                thirtyAjax(zoneValX, timeVal, tablecondX);
                thirtyfourAjax(zoneValX, timeVal, tablecondX);
            } else {
                $("#benchzone_card").hide();
                $("#benchzonef_card").hide();
            }
            if (regionLengthY != 0) {
                condX += `Region IN (${regionValX}) AND `;
                conddealerX += `Region IN (${regionValX}) AND `;
                filtercondX += `|| <b>Region</b> IN (${regionVal}) `;
                filtercondX2 += `|| Region IN (${regionVal}) `;
                tablecondX += `,Region`;
                $("#benchregion_card").show();
                $("#benchregionf_card").show();
                $("#benchindia_card").removeClass("col-lg-6");
                $("#benchindia_card").addClass("col-lg-4");
                $("#benchzone_card").removeClass("col-lg-6");
                $("#benchzone_card").addClass("col-lg-4");
                $("#benchregion_card").removeClass("col-lg-4");
                $("#benchregion_card").addClass("col-lg-4");

                $("#benchindiaf_card").removeClass("col-lg-6");
                $("#benchindiaf_card").addClass("col-lg-4");
                $("#benchzonef_card").removeClass("col-lg-6");
                $("#benchzonef_card").addClass("col-lg-4");
                $("#benchregionf_card").removeClass("col-lg-4");
                $("#benchregionf_card").addClass("col-lg-4");
                thirtyoneAjax(regionValX, timeVal, tablecondX);
                thirtyfiveAjax(regionValX, timeVal, tablecondX);

                if (maindealerVal != "0") {

                    // alert("hii");
                    condX += `Main_dealer_name = '${maindealerVal}' AND `;

                    filtercondX += `|| <b>Main Dealer</b> IN (${maindealerVal}) `;
                    filtercondX2 += `|| Main Dealer IN (${maindealerVal}) `;
                    tablecondX += `,Main_dealer_name`;
                    $("#benchdealer_card").show();
                    $("#benchdealerf_card").show();
                    $("#benchindia_card").removeClass("col-lg-4");
                    $("#benchindia_card").addClass("col-lg-3");
                    $("#benchzone_card").removeClass("col-lg-4");
                    $("#benchzone_card").addClass("col-lg-3");
                    $("#benchregion_card").removeClass("col-lg-4");
                    $("#benchregion_card").addClass("col-lg-3");

                    $("#benchindiaf_card").removeClass("col-lg-4");
                    $("#benchindiaf_card").addClass("col-lg-3");
                    $("#benchzonef_card").removeClass("col-lg-4");
                    $("#benchzonef_card").addClass("col-lg-3");
                    $("#benchregionf_card").removeClass("col-lg-4");
                    $("#benchregionf_card").addClass("col-lg-3");

                    thirtytwoAjax(maindealerVal, timeVal, tablecondX);
                    thirtysixAjax(maindealerVal, timeVal, tablecondX);

                    $("#stateField").hide();
                    $("#cityField").hide();
                } else {
                    dealerVal = 0;
                    $("#benchdealer_card").hide();
                    $("#benchdealerf_card").hide();
                    $("#stateField").show();
                    $("#cityField").show();
                }
                if (dealerVal != '0') {
                    condX += `Dealer_name= '${dealerVal}' AND `;

                    filtercondX += `|| <b>Dealer</b> IN (${dealerVal}) `;
                    filtercondX2 += `|| Dealer IN (${dealerVal}) `;
                    tablecondX += `,Dealer_name`;
                    $("#benchsubdealer_card").show();
                    $("#benchsubdealerf_card").show();

                    $("#benchindia_card").removeClass("col-lg-4");
                    $("#benchindia_card").addClass("col-lg-4");
                    $("#benchzone_card").removeClass("col-lg-3");
                    $("#benchzone_card").addClass("col-lg-2");
                    $("#benchregion_card").removeClass("col-lg-3");
                    $("#benchregion_card").addClass("col-lg-2");
                    $("#benchdealer_card").removeClass("col-lg-3");
                    $("#benchdealer_card").addClass("col-lg-2");

                    $("#benchindiaf_card").removeClass("col-lg-4");
                    $("#benchindiaf_card").addClass("col-lg-4");
                    $("#benchzonef_card").removeClass("col-lg-3");
                    $("#benchzonef_card").addClass("col-lg-2");
                    $("#benchregionf_card").removeClass("col-lg-3");
                    $("#benchregionf_card").addClass("col-lg-2");
                    $("#benchdealerf_card").removeClass("col-lg-3");
                    $("#benchdealerf_card").addClass("col-lg-2");

                    thirtyeightAjax(dealerVal, timeVal, tablecondX);
                    thirtynineAjax(dealerVal, timeVal, tablecondX);
                } else {
                    $("#benchsubdealer_card").hide();
                    $("#benchsubdealerf_card").hide();
                }
                if (stateLengthY != 0) {
                    condX += `State IN (${stateValX}) AND `;
                    conddealerX += `State IN (${stateValX}) AND `;
                    filtercondX += `|| <b>State</b> IN (${stateVal}) `;
                    filtercondX2 += `|| State IN (${stateVal}) `;
                    tablecondX += `,State`;
                    $("#benchindia_card").removeClass("col-lg-4");
                    $("#benchindia_card").addClass("col-lg-3");
                    $("#benchzone_card").removeClass("col-lg-4");
                    $("#benchzone_card").addClass("col-lg-3");
                    $("#benchregion_card").removeClass("col-lg-4");
                    $("#benchregion_card").addClass("col-lg-3");
                    $("#benchstate_card").removeClass("col-lg-3");
                    $("#benchstate_card").addClass("col-lg-3");

                    $("#benchindiaf_card").removeClass("col-lg-4");
                    $("#benchindiaf_card").addClass("col-lg-3");
                    $("#benchzonef_card").removeClass("col-lg-4");
                    $("#benchzonef_card").addClass("col-lg-3");
                    $("#benchregionf_card").removeClass("col-lg-4");
                    $("#benchregionf_card").addClass("col-lg-3");
                    $("#benchdealerf_card").removeClass("col-lg-3");
                    $("#benchdealerf_card").addClass("col-lg-3");
                    $("#benchstatef_card").removeClass("col-lg-3");
                    $("#benchstatef_card").addClass("col-lg-3");

                    $("#benchstate_card").show();
                    $("#benchstatef_card").show();
                    $("#maindealerField").hide();
                    $("#dealerField").hide();
                    $("#cityField").show();

                    fortyAjax(stateValX, timeVal, tablecondX);
                    fortyoneAjax(stateValX, timeVal, tablecondX);
                } else {
                    $("#benchstate_card").hide();
                    $("#benchstatef_card").hide();
                    $("#maindealerField").show();
                    $("#dealerField").show();
                    $("#cityField").hide();
                }

                if (cityLengthY != 0) {
                    condX += `City IN (${cityValX}) AND `;
                    conddealerX += `City IN (${cityValX}) AND `;
                    filtercondX += `|| <b>City</b> IN (${cityVal}) `;
                    filtercondX2 += `|| City IN (${cityVal}) `;
                    tablecondX += `,City`;
                    $("#benchindia_card").removeClass("col-lg-4");
                    $("#benchindia_card").addClass("col-lg-4");
                    $("#benchzone_card").removeClass("col-md-3");
                    $("#benchzone_card").removeClass("col-lg-2");
                    $("#benchzone_card").removeClass("col-lg-3");
                    $("#benchzone_card").addClass("col-lg-2");

                    $("#benchregion_card").removeClass("col-md-3");
                    $("#benchregion_card").removeClass("col-lg-2");
                    $("#benchregion_card").removeClass("col-lg-3");
                    $("#benchregion_card").addClass("col-lg-2");

                    $("#benchstate_card").removeClass("col-lg-3");
                    $("#benchstate_card").addClass("col-lg-2");
                    $("#benchcity_card").removeClass("col-lg-3");
                    $("#benchcity_card").addClass("col-lg-2");

                    $("#benchindiaf_card").removeClass("col-lg-4");
                    $("#benchindiaf_card").addClass("col-lg-4");

                    $("#benchzonef_card").removeClass("col-md-3");
                    $("#benchzonef_card").removeClass("col-lg-2");
                    $("#benchzonef_card").removeClass("col-lg-3");
                    $("#benchzonef_card").addClass("col-lg-2");

                    $("#benchregionf_card").removeClass("col-md-3");
                    $("#benchregionf_card").removeClass("col-lg-2");
                    $("#benchregionf_card").removeClass("col-lg-3");
                    $("#benchregionf_card").addClass("col-lg-2");

                    $("#benchstatef_card").removeClass("col-lg-3");
                    $("#benchstatef_card").addClass("col-lg-2");
                    $("#benchcityf_card").removeClass("col-lg-3");
                    $("#benchcityf_card").addClass("col-lg-2");

                    $("#benchstate_card").show();
                    $("#benchstatef_card").show();
                    $("#maindealerField").hide();
                    $("#dealerField").hide();
                    $("#cityField").show();
                    $("#benchcity_card").show();
                    $("#benchcityf_card").show();

                    fortythreeAjax(cityValX, timeVal, tablecondX);
                    fortyfourAjax(cityValX, timeVal, tablecondX);
                } else {

                    $("#benchcity_card").hide();
                    $("#benchcityf_card").hide();



                }
            } else {
                $("#benchregion_card").hide();
                $("#benchregionf_card").hide();
            }





            condX += ` 1=1 AND`;
            ////////debugger;
            $(".paraY").empty().append(filtercondX);
            $(".paraX").empty().append(filtercondX2);
            console.log(condX);
            console.log(tablecondX);
        } else {
            filtercondX = ``;
            filtercondX2 = ``;
            condX += ` 1=1 AND`;
            filtercondX += `<b>Time Period</b> IN (${timeText}) `;
            filtercondX2 += `Time Period IN (${timeText}) `;
            $(".paraY").empty().append(filtercondX);
            $(".paraX").empty().append(filtercondX2);
            console.log(condX);
            console.log(tablecondX);

        }
        console.log(condX);
        console.log("hiiiuser");
        console.log(userType);
        if(userType!=1)
        {
            firstAjax2(condX, timeVal, tablecondX);
            thirdAjax2(condX, timeVal, tablecondX);
            secondAjax2(condX, timeVal, tablecondX);
            forthAjax2(condX, timeVal, tablecondX);
            fifthAjax2(condX, timeVal, tablecondX);
            sixthAjax2(condX, timeVal, tablecondX);
            seventhAjax2(condX, timeVal, tablecondX);
            eightAjax2(condX, timeVal, tablecondX);
            nineAjax2(condX, timeVal, tablecondX);
            tenthAjax2(condX, timeVal, tablecondX);
        }
        

        firstAjax(condX, timeVal, tablecondX);
        thirdAjax(condX, timeVal, tablecondX);
        secondAjax(condX, timeVal, tablecondX);
        forthAjax(condX, timeVal, tablecondX);
        fifthAjax(condX, timeVal, tablecondX);
        sixthAjax(condX, timeVal, tablecondX);
        seventhAjax(condX, timeVal, tablecondX);
        eightAjax(condX, timeVal, tablecondX);
        nineAjax(condX, timeVal, tablecondX);
        tenthAjax(condX, timeVal, tablecondX);
        elevenAjax(condX, timeVal, tablecondX);
        twelveAjax(condX, timeVal, tablecondX);
        thirteenAjax(condX, timeVal, tablecondX);
        fourteenAjax(condX, timeVal, tablecondX);
        fifteenAjax(condX, timeVal, tablecondX);
        sixteenAjax(condX, timeVal, tablecondX);
        seventeenAjax(condX, timeVal, tablecondX);
        eighteenAjax(condX, timeVal, tablecondX);
        nineteenAjax(condX, timeVal, tablecondX);
        twentyAjax(condX, timeVal, tablecondX);
         nintyAjax(condX, timeVal, zoneVal,tablecondX);
         nintyoneAjax(condX, timeVal, regionVal,tablecondX);
        twentythreeAjax(condX, timeVal, zoneVal, tablecondX);
        twentyfourAjax(condX, timeVal, regionVal, tablecondX);
        twentyeightAjax(condX, timeVal, tablecondX);
        twentyeightAjaxXX(condX, timeVal, tablecondX);
        twentynineAjax(condX, timeVal, tablecondX);
        thirtythreeAjax(condX, timeVal, tablecondX); // baki ka 34,35,36 neeche bana hai.
        thirtysevenAjax(conddealerX, timeVal, tablecondX);
        setTimeout(() => {
            if (shL != 0) {
                $('.splash').hide();
            }
            if (shL == 1) {
                //$("#zone").change(); /*NCH Sar*/
            }
        }, 4000);
        //debugger;
        if(userType==1)
        {
            setTimeout(() => {
                fortytwoAjax(datafortable, datafortable2, condX, timeVal);
            }, 15000);
        }
        
    }
    //=================================Apply Filter End============================================
    function firstAjax(condX, timeVal, tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajax1.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },
            success: function(response) {
                var data = JSON.parse(response);
                if (conX == 1) {
                    datafortable['0'] = data;
                } else {
                    datafortable2['0'] = data;
                }

                var base = data['base'];
                QSSIV = data['ssi'];
                QSATV = 956;
                Q4V = data['Q4'];
                Q4_1V = data['Q4_1'];
                Q4_2V = data['Q4_2'];
                Q8V = data['Q8'];
                Q8_1V = data['Q8_1'];
                Q8_2V = data['Q8_2'];
                Q5Detractor = data['Q5_1'];
                Q5Passsive = data['Q5_2'];
                Q5Promoter = data['Q5_3'];
                Q5Nps = data['Q5_NPS'];
                Q9Detractor = data['Q9_1'];
                Q9Passsive = data['Q9_2'];
                Q9Promoter = data['Q9_3'];
                Q9Nps = data['Q9_NPS'];
                var absdealer = data['Q8V'];
                var abshyundai = data['Q4V'];
                setTimeout(() => {
                    Q4(Q4V);
                    SSI(QSSIV);
                    QSAT(QSATV);
                    Q8(Q8V);
                    Q5(Q5Nps);
                    Q9(Q9Nps);
                }, 1000);
                var baseHtml = ``;
                baseHtml +=
                `<h6 class="ml-2 mt-2"><b style="font-weight: 500;color:#003266">Sample Size:${base}</b></h6>`;
                $("#overallPBase").empty().append(baseHtml);
                $("#preferDatalabel").empty().append(`${Q4V}%`);
                $("#dealerDatalabel").empty().append(`${Q8V}%`);
                $("#rating3A").empty().append(`85%`);
                $("#rating3B").empty().append(`9%`);
                $("#rating1A").empty().append(`${Q4_1V}%`);
                $("#rating1B").empty().append(`${Q4_2V}%`);
                $("#rating2A").empty().append(`${Q8_1V}%`);
                $("#rating2B").empty().append(`${Q8_2V}%`);

                $("#q5D").empty().append(`${Q5Detractor}%`);
                $("#q5Pa").empty().append(`${Q5Passsive}%`);
                $("#q5P").empty().append(`${Q5Promoter}%`);
                $("#q9D").empty().append(`${Q9Detractor}%`);
                $("#q9Pa").empty().append(`${Q9Passsive}%`);
                $("#q9P").empty().append(`${Q9Promoter}%`);

                $("#absdealer").empty().append(`(Count-${absdealer})`);
                $("#abshyundai").empty().append(`(Count-${abshyundai})`);

            }
        });
    }
    function secondAjax(condX, timeVal, tablecondX) {
        $.ajax({
            url: "api/ajax2.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX

            },
            success: function(response) {
                ////debugger;
                var data = JSON.parse(response);
                console.log(data);
                if (conX == 1) {
                    datafortable['1'] = data;
                } else {
                    datafortable2['1'] = data;
                }
                console.log(data);
                var Q12V = [];
                var Q13V = [];
                var Q14V = [];
                var Q15bV = [];
                var Q15dV = [];
                var base = data['base'];
                var Q11V = data['Q11'];
                var Q12outstanding = data['Q12O'];
                var Q12poor = data['Q12p'];

                var Q13outstanding = data['Q13O'];
                var Q13poor = data['Q13p'];

                var Q14outstanding = data['Q14O'];
                var Q14poor = data['Q14p'];

                var Q15V = data['Q15'];
                //  alert(Q15V);
                var Q15aV = data['Q15a'];
                var Q15boutstanding = data['Q15bO'];
                var Q15bpoor = data['Q15bp'];

                var Q15cV = data['Q15c'];
                var Q15doutstanding = data['Q15dO'];
                var Q15dpoor = data['Q15dp'];

                var satisfiedNo1 = data['Q12OAN'];
                var unsatisfiedNo1 = data['Q12pAN'];

                var satisfiedNo2 = data['Q14OAN'];
                var unsatisfiedNo2 = data['Q14pAN'];

                var satisfiedNo3 = data['Q13OAN'];
                var unsatisfiedNo3 = data['Q13pAN'];

                var satisfiedNo4 = data['Q15bOAN'];
                var unsatisfiedNo4 = data['Q15bpAN'];

                var satisfiedNo5 = data['Q15dOAN'];
                var unsatisfiedNo5 = data['Q15dpAN'];

                Q12V.push(Q12outstanding);
                Q12V.push(Q12poor);
                Q13V.push(Q13outstanding);
                Q13V.push(Q13poor);
                Q14V.push(Q14outstanding);
                Q14V.push(Q14poor);
                Q15bV.push(Q15boutstanding);
                Q15bV.push(Q15bpoor);
                Q15dV.push(Q15doutstanding);
                Q15dV.push(Q15dpoor);

                $("#purchaseabs").empty().append(`(Count-${data['Q11V']})`);
                $("#availbilityabs").empty().append(`(Count-${data['Q15V']})`);
                $("#bookingabs").empty().append(`(Count-${data['Q15aV']})`);
                $("#financeabs").empty().append(`(Count-${data['Q15cV']})`);


                $("#satisfied_no1").empty().append(`Satisfied-Rated 9/10 (Count-${satisfiedNo1})`);
                $("#unsatisfied_no1").empty().append(`Dissatisfied-Rated 1-8 (Count-${unsatisfiedNo1})`);
                $("#satisfied_no2").empty().append(`Satisfied-Rated 9/10 (Count-${satisfiedNo2})`);
                $("#unsatisfied_no2").empty().append(`Dissatisfied-Rated 1-8 (Count-${unsatisfiedNo2})`);
                $("#satisfied_no3").empty().append(`Satisfied-Rated 9/10 (Count-${satisfiedNo3})`);
                $("#unsatisfied_no3").empty().append(`Dissatisfied-Rated 1-8 (Count-${unsatisfiedNo3})`);
                $("#satisfied_no4").empty().append(`Satisfied-Rated 9/10 (Count-${satisfiedNo4})`);
                $("#unsatisfied_no4").empty().append(`Dissatisfied-Rated 1-8 (Count-${unsatisfiedNo4})`);
                $("#satisfied_no5").empty().append(`Satisfied-Rated 9/10 (Count-${satisfiedNo5})`);
                $("#unsatisfied_no5").empty().append(`Dissatisfied-Rated 1-8 (Count-${unsatisfiedNo5})`);

                setTimeout(() => {
                    Q11(Q11V);
                    overallHyundai(f1V);
                    Q12(Q12V);
                    Q13(Q13V);
                    Q14(Q14V);
                    Q15(Q15V);
                    Q15a(Q15aV);
                    Q15b(Q15bV);
                    Q15c(Q15cV)
                    Q15d(Q15dV);
                }, 2000);

            }
        });
    }

    function thirdAjax(condX, timeVal, tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajax3.php",
            type: "POST",
            data: {
                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },
            success: function(response) {
                var data = JSON.parse(response);
                if (conX == 1) {
                    datafortable['2'] = data;
                } else {
                    datafortable2['2'] = data;
                }

                f1V = data['digiSSI'];
                f2V = data['dfSSI'];
                f3V = data['scSSI'];
                f4V = data['dSSI'];
                f5V = data['paperSSI'];
                f6V = data['deSSI'];

                $("#ft1").empty().append(`${f1V}`);
                $("#ft2").empty().append(`${f2V}`);
                $("#ft3").empty().append(`${f3V}`);
                $("#ft4").empty().append(`${f4V}`);
                $("#ft5").empty().append(`${f5V}`);
                $("#ft6").empty().append(`${f6V}`);

                setTimeout(() => {
                    f1(f1V);
                    f2(f2V);
                    f3(f3V);
                    f4(f4V);
                    f5(f5V);
                    f6(f6V);
                }, 2000);
            }
        });
    }

    function forthAjax(condX, timeVal, tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajax4.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },
            success: function(response) {
                var data = JSON.parse(response);
                if (conX == 1) {
                    datafortable['3'] = data;
                } else {
                    datafortable2['3'] = data;
                }
                var Q17V = data['Q17'];
                var Q18aV = data['Q18a'];
                var Q18cV = data['Q18c'];
                var Q18dV = data['Q18d'];

                $("#infraabs").empty().append(`(Count-${data['Q17V']})`);
                $("#parkingabs").empty().append(`(Count-${data['Q18aV']})`);
                $("#showroomabs").empty().append(`(Count-${data['Q18cV']})`);
                $("#qualityabs").empty().append(`(Count-${data['Q18dV']})`);

                setTimeout(() => {
                    overallFacility(f2V);
                    Q17(Q17V);
                    Q18a(Q18aV);
                    Q18c(Q18cV);
                    Q18d(Q18dV);
                }, 2000);


            }
        });
    }

    function fifthAjax(condX, timeVal, tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajax5.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },
            success: function(response) {
                //debugger;
                var data = JSON.parse(response);
                console.log("dataDD=>");
                console.log(data);
                if (conX == 1) {
                    datafortable['4'] = data;
                } else {
                    datafortable2['4'] = data;
                }
                var salesYesV = [];
                var salesNoV = [];
                var Q19e2V = [];
                var satisfiedNo8 = data['Q19e2OAN'];
                var unsatisfiedNo8 = data['Q19e2pAN'];
                var Q23aV = data['Q23a'];
                var Q19V = data['Q19'];
                var Q19a1V = data['Q19a1'];
                var Q19a2V = data['Q19a2'];
                var Q19a3V = data['Q19a3'];
                var Q19aV = data['Q19a'];
                var Q19bV = data['Q19b'];
                var Q19dV = data['Q19d'];
                var Q19eV = data['Q19e'];
                var Q19e3V = data['Q19e3'];
                var Q19fV = data['Q19f'];
                var Q19e2outstanding = data['Q19e2O'];
                var Q19e2poor = data['Q19e2p'];
                Q19e2V.push(Q19e2outstanding);
                Q19e2V.push(Q19e2poor);
                salesYesV.push(Q19a1V);
                salesYesV.push(Q19a2V);
                salesYesV.push(Q19a3V);
                salesYesV.push(Q19eV);
                salesYesV.push(Q19fV);
                salesYesV.push(Q19e3V);
                salesYesV.push(Q23aV);
                console.log("salesYesV=>" + salesYesV);

                salesNoV.push(Q19aV);
                salesNoV.push(Q19bV);
                salesNoV.push(Q19dV);
                var maxV = Math.max(...salesNoV)+10;
                console.log(maxV);
                $("#salesyesabs").empty().append(
                    `(Count-a(${data['Q19a1V']}),b(${data['Q19a2V']}),c(${data['Q19a3V']}),d(${data['Q19eV']}),e(${data['Q19fV']}),f(${data['Q19e3V']}))`
                );

                $("#expsalesabs").empty().append(`(Count-${data['Q19V']})`);

                $("#weaksalesabs").empty().append(
                    `(Count-a(${data['Q19aV']}),b(${data['Q19bV']}),c(${data['Q19dV']}))`);
                $("#satisfied_no8").empty().append(`Satisfied-Rated 9/10 (Count-${satisfiedNo8})`);
                $("#unsatisfied_no8").empty().append(`Dissatisfied-Rated 1-8 (Count-${unsatisfiedNo8})`);

                //console.log(salesYesV);
                //console.log(salesNoV);

                setTimeout(() => {
                    overallSalesyes(f3V);
                    Q19(Q19V);
                    salesYes(salesYesV);
                    salesNo(salesNoV,maxV);
                    Q19e2F(Q19e2V);
                    // Q19a1(Q19a1V);
                    // Q19a2(Q19a2V);
                    // Q19a3(Q19a3V);
                    // Q19a(Q19aV);
                    // Q19b(Q19bV);
                    // Q19d(Q19dV);
                    // Q19e(Q19eV);
                    // Q19e3(Q19e3V);
                    // Q19f(Q19fV);
                }, 2000);



            }
        });
    }

    function sixthAjax(condX, timeVal, tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajax6.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },
            success: function(response) {
                var data = JSON.parse(response);
                if (conX == 1) {
                    datafortable['5'] = data;
                } else {
                    datafortable2['5'] = data;
                }
                var Q22V = [];
                var Q20V = data['Q20'];
                var Q21V = data['Q21'];
                var Q22outstanding = data['Q22O'];
                var Q22poor = data['Q22p'];
                var Q23V = data['Q23'];
                var satisfied_No6 = data['Q22OAN'];
                var unsatisfied_No6 = data['Q22pAN'];
                Q22V.push(Q22outstanding);
                Q22V.push(Q22poor);
                $("#satisfied_no6").empty().append(`Satisfied-Rated 9/10 (Count-${satisfied_No6})`);
                $("#unsatisfied_no6").empty().append(`Dissatisfied-Rated 1-8 (Count-${unsatisfied_No6})`);
                $("#reasonabs").empty().append(
                    `(Count-a(${data['Q23V'][0]}),b(${data['Q23V'][1]}),c(${data['Q23V'][2]})))`);

                $("#dealershipabs").empty().append(`(Count-${data['Q20V']})`);
                $("#purchasedabs").empty().append(`(Count-${data['Q21V']})`);
                setTimeout(() => {
                    Q20(Q20V);
                    Q21(Q21V);
                    Q22(Q22V);
                    Q23(Q23V);
                }, 1000);


            }
        });
    }

    function seventhAjax(condX, timeVal, tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajax7.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },
            success: function(response) {
                var data = JSON.parse(response);
                if (conX == 1) {
                    datafortable['6'] = data;
                } else {
                    datafortable2['6'] = data;
                }

                var Q25V = data['Q25'];
                var maxX = Math.max(...Q25V)+10;
                var Q24V = data['Q24'];
                $("#dealabs").empty().append(`(Count-${data['Q24V']})`);
                $("#workingabs").empty().append(
                    `(Count-a(${data['Q25V'][0]}),b(${data['Q25V'][1]}),c(${data['Q25V'][2]}),d(${data['Q25V'][3]}))`
                );

                workingabs
                setTimeout(() => {
                    overallDeal(f4V);
                    Q24(Q24V);
                    Q25(Q25V,maxX);
                }, 1000);


            }
        });
    }

    function eightAjax(condX, timeVal, tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajax8.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },
            success: function(response) {
                var data = JSON.parse(response);
                if (conX == 1) {
                    datafortable['7'] = data;
                } else {
                    datafortable2['7'] = data;
                }
                var Q26NV = data['Q26N'];
                var Q26aV = data['Q26a'];
                var Q26aVmax = Math.max(...Q26aV)+10;
                
                var Q26bV = data['Q26b'];
                var Q26bVmax = Math.max(...Q26bV)+10;
                var Q26V = data['Q26'];
                var Q26Vmax = Math.max(...Q26V)+10;
                console.log("quest");
                console.log(Q26aV);
                console.log(Q26bV);
                console.log(Q26aVmax);
                console.log(Q26bVmax);

                $("#exppaperabs").empty().append(`(Count-${data['Q26NV']})`);
                $("#timeabs").empty().append(
                    `(Count-a(${data['Q26aV'][0]}),b(${data['Q26aV'][1]}),c(${data['Q26aV'][2]}))`);
                // $("#processabs").empty().append(`(Count-a(${data['Q26bV'][0]}),b(${data['Q26bV'][1]}),c(${data['Q26bV'][2]}))`);
                $("#processabs").empty().append(
                    `(Count-a(${data['Q26bV'][0]}),b(${data['Q26bV'][1]}),c(${data['Q26bV'][2]}))`);
                $("#diagabs").empty().append(
                    `(Count-a(${data['Q26V'][0]}),b(${data['Q26V'][1]}),c(${data['Q26V'][2]}))`);


                setTimeout(() => {
                    overallTime(f5V);
                    Q26N(Q26NV);
                    Q26a(Q26aV,Q26aVmax);
                    Q26b(Q26bV,Q26bVmax);
                    Q26(Q26V,Q26Vmax);
                }, 1000);


            }
        });
    }

    function nineAjax(condX, timeVal, tablecondX) {
        //////debugger;
        //console.log(conX)
        $.ajax({
            url: "api/ajax9.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },
            success: function(response) {
                var data = JSON.parse(response);
                var delivery_attrN = <?php echo json_encode($delivery_attrN); ?>;
                if (conX == 1) {
                    datafortable['8'] = data;
                } else {
                    datafortable2['8'] = data;
                }
                var Q27V = data['Q27'];
                var Q28aV = data['Q28a'];
                var Q28aVmax = Math.max(...Q28aV)+3;
                var Q28bV = data['Q28b'];
                var Q28bVmax = Math.max(...Q28bV)+3;
                var Q28eV = data['Q28e'];
                var Q28eVmax = Math.max(...Q28eV)+3;
                var Q28dV = data['Q28d'];
                var deliverAttrV = data['delivery_attr'];
                cat2X = [];
                val2X = [];
                var dataX = Object.assign(delivery_attrN.map(function(element, index) {
                    return {
                        ['name']: element,
                        ['data']: deliverAttrV[index]
                    };
                }));
                console.log(dataX);
                dataX.sort((a, b) => b['data'] - a['data']);
                var cat = dataX.map(function(e, i, a) {
                    return e.name;
                });
                var val = dataX.map(function(e, i, a) {
                    return e.data;
                });

                for (var i = 0; i < 5; i++) {
                    cat2X.push(cat[i]);
                    val2X.push(val[i]);
                }
                data['delivery_attrV'].sort((a, b) => b - a);

                $("#newvehicleabs").empty().append(`(Count-${data['Q27V']})`);
                $("#duringvehicleabs").empty().append(
                    `(Count-a(${data['Q28aV'][0]}),b(${data['Q28aV'][1]}),c(${data['Q28aV'][2]}),d(${data['Q28aV'][3]}))`
                );
                $("#operatingabs").empty().append(
                    `(Count-a(${data['Q28bV'][0]}),b(${data['Q28bV'][1]}),c(${data['Q28bV'][2]}))`);
                $("#deliveryabs").empty().append(
                    `(Count-a(${data['Q28eV'][0]}),b(${data['Q28eV'][1]}),c(${data['Q28eV'][2]}))`);

                $("#attrabs").empty().append(`(Count-${data['Q28dV']})`);

                $("#delivery_attabs").empty().append(
                    `(Count-a(${data['delivery_attrV'][0]}),b(${data['delivery_attrV'][1]}),c(${data['delivery_attrV'][2]}),d(${data['delivery_attrV'][3]}),e(${data['delivery_attrV'][4]}))`
                );

                setTimeout(() => {
                    overallService(f6V);
                    Q27(Q27V);
                    Q28a(Q28aV,Q28aVmax);
                    Q28b(Q28bV,Q28bVmax);
                    Q28e(Q28eV,Q28eVmax);
                    Q28d(Q28dV);
                    deliveryAttr(cat, val);
                }, 1000);


            }
        });
    }

    function tenthAjax(condX, timeVal, tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajax10.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },
            success: function(response) {
                var data = JSON.parse(response);
                if (conX == 1) {
                    datafortable['9'] = data;
                } else {
                    datafortable2['9'] = data;
                }
                var hostV = data['host'];
                var empathyV = data['empathy'];
                var anticipateV = data['anticipate'];
                var respectV = data['respect'];
                var thanksV = data['thanks'];
                setTimeout(() => {
                    host(hostV);
                    empathy(empathyV);
                    anticipate(anticipateV);
                    respect(respectV);
                    thanks(thanksV);
                }, 1000);


            }
        });
    }
    function firstAjax2(condX, timeVal, tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajaxone.php",
            type: "POST",
            data: {
                'timeX': timeVal,
            },
            success: function(response) {
                var data = JSON.parse(response);
                datafortable['0'] = data;
                console.log("filteroverall");
                console.log(datafortable);
            }
        });
    }
    function secondAjax2(condX, timeVal, tablecondX) {
        $.ajax({
            url: "api/ajaxtwo.php",
            type: "POST",
            data: {
                'timeX': timeVal,
            },
            success: function(response) {
                ////debugger;
                var data = JSON.parse(response);
                datafortable['1'] = data;
                console.log(data);
            }
        });
    }

    function thirdAjax2(condX, timeVal, tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajaxthree.php",
            type: "POST",
            data: {
                'timeX': timeVal,
            },
            success: function(response) {
                var data = JSON.parse(response);
                datafortable['2'] = data;
            }
        });
    }
    function forthAjax2(condX, timeVal, tablecondX) {
            //console.log(conX)
            $.ajax({
                url: "api/ajaxfour.php",
                type: "POST",
                data: {
                    'timeX': timeVal,
                },
                success: function(response) {
                    var data = JSON.parse(response);
                    datafortable['3'] = data;
                }
            });
        }

    function fifthAjax2(condX, timeVal, tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajaxfive.php",
            type: "POST",
            data: {
                'timeX': timeVal,
            },
            success: function(response) {
                //debugger;
                var data = JSON.parse(response);
                datafortable['4'] = data;
            }
        });
    }
    function sixthAjax2(condX, timeVal, tablecondX) {
        $.ajax({
            url: "api/ajaxsix.php",
            type: "POST",
            data: {
                'timeX': timeVal,
            },
            success: function(response) {
                var data = JSON.parse(response);
                datafortable['5'] = data;
            }
        });
    }
    function seventhAjax2(condX, timeVal, tablecondX) {
        $.ajax({
            url: "api/ajaxseven.php",
            type: "POST",
            data: {
                'timeX': timeVal,
            },
            success: function(response) {
                var data = JSON.parse(response);
                datafortable['6'] = data;
            }
        });
    }
    function eightAjax2(condX, timeVal, tablecondX) {
        $.ajax({
            url: "api/ajaxeight.php",
            type: "POST",
            data: {
                'timeX': timeVal,
            },
            success: function(response) {
                var data = JSON.parse(response);
                datafortable['7'] = data;
            }
        });
    }
    function nineAjax2(condX, timeVal, tablecondX) {
        $.ajax({
            url: "api/ajaxnine.php",
            type: "POST",
            data: {
                'timeX': timeVal,
            },
            success: function(response) {
                var data = JSON.parse(response);
                datafortable['8'] = data;
            }
        });
    }
    function tenthAjax2(condX, timeVal, tablecondX) {
        $.ajax({
            url: "api/ajaxten.php",
            type: "POST",
            data: {
                'timeX': timeVal,
            },
            success: function(response) {
                var data = JSON.parse(response);
                datafortable['9'] = data;
            }
        });
    }
    function elevenAjax(condX, timeVal, tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajax11.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },
            success: function(response) {
                var data = JSON.parse(response);
                console.log(data);
                var dataSsiperformance = [data['ssi']];
                var dataSsiperformance2 = data['ssi'];
                var ssiperformanceTrendsCat = ['Performance'];
                var ssiperformanceLucifer = Object.assign(dataSsiperformance.map(function(element, index) {
                    return {
                        ['name']: ssiperformanceTrendsCat[index],
                        ['data']: element
                    };
                }));
                var hyundainpsTrendsCat = ['Performance'];
                var dataHyundainps = [data['q5']];
                var dataHyundainps2 = data['q5'];

                var hyundainpsLucifer = Object.assign(dataHyundainps.map(function(element, index) {
                    return {
                        ['name']: hyundainpsTrendsCat[index],
                        ['data']: element
                    };
                }));
                console.log(hyundainpsLucifer);

                var hyundaipreferenceTrendsCat = ['Performance'];
                var dataHyundaipreference = [data['q4']];
                var dataHyundaipreference2 = data['q4'];

                var hyundaipreferenceLucifer = Object.assign(dataHyundaipreference.map(function(element,
                    index) {
                    return {
                        ['name']: hyundaipreferenceTrendsCat[index],
                        ['data']: element
                    };
                }));

                var dealernpsTrendsCat = ['Performance'];
                var datadealernps = [data['q9']];
                var datadealernps2 = data['q9'];

                var dealernpsLucifer = Object.assign(datadealernps.map(function(element, index) {
                    return {
                        ['name']: dealernpsTrendsCat[index],
                        ['data']: element
                    };
                }));

                var dealerpreferenceTrendsCat = ['Performance'];
                var datadealerpreference = [data['q8']];
                var datadealerpreference2 = data['q8'];

                var dealerpreferenceLucifer = Object.assign(datadealerpreference.map(function(element,
                    index) {
                    return {
                        ['name']: dealerpreferenceTrendsCat[index],
                        ['data']: element
                    };
                }));



                setTimeout(() => {
                    SsiperformanceTrends(ssiperformanceLucifer);
                    hyundaiNpsTrends(hyundainpsLucifer);
                    hyundaiPreferenceTrends(hyundaipreferenceLucifer);
                    dealerNpsTrends(dealernpsLucifer);
                    dealerpreferenceTrends(dealerpreferenceLucifer);
                    SsiperformanceTrends2(dataSsiperformance2);
                    hyundaiNpsTrends2(dataHyundainps2);
                    hyundaiPreferenceTrends2(dataHyundaipreference2);
                    dealerNpsTrends2(datadealernps2);
                    dealerpreferenceTrends2(datadealerpreference2);

                }, 1000);


            }
        });
    }

    function nintyAjax(condX, timeVal, zoneVal,tablecondX) {
        debugger;
        if (zoneVal.length == 0) {
            zoneVal = ['Overall', 'Central', 'South', 'North', 'East', 'West'];
        } else {
            zoneVal.unshift("Overall");
        }
        $.ajax({
            url: "api/ajax90.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'zoneVal': zoneVal,
                'tablecondX': tablecondX
            },

            success: function(response) {
                debugger;
                var data = JSON.parse(response);
                console.log("Zone D");
                console.log(data);

                var colorsXX = ['#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99'];
                var dataZonalssi = data['ssi'];
                var dataZonalnps = data['nps'];

                var zoneCat = zoneVal;
                console.log(dataZonalssi);

                var arr = [];
                for (var k = 0; k < dataZonalssi[0].length; k++) {
                    var arr2 = [];
                    for (var j = 0; j < dataZonalssi.length; j++) {
                        arr2.push(dataZonalssi[j][k])
                    }
                    arr.push(arr2);
                }

                var zonalssiLucifer = Object.assign(arr.map(function(element, index) {
                    return {
                        ['name']: zoneCat[index],
                        ['data']: element,

                    };
                }));

                var zonalssiLucifer2 = Object.assign(arr.map(function(element, index) {
                    return {
                        ['name']: zoneCat[index],
                        ['data']: element,
                        ['color']: colorsXX[index]

                    };
                }));



                var arr3 = [];
                for (var k = 0; k < dataZonalnps[0].length; k++) {
                    var arr4 = [];
                    for (var j = 0; j < dataZonalnps.length; j++) {
                        arr4.push(dataZonalnps[j][k])
                    }
                    arr3.push(arr4);
                }




                // zonalssiLucifer.sort((a,b)=>b['data']-a['data']);
                //arr1.push(zonalssiLucifer);


                var zonalnpsLucifer = Object.assign(arr3.map(function(element, index) {
                    return {
                        ['name']: zoneCat[index],
                        ['data']: element,

                    };
                }));
                // zonalnpsLucifer.sort((a,b)=>b['data']-a['data']);

                var zonalnpsLucifer2 = Object.assign(arr3.map(function(element, index) {
                    return {
                        ['name']: zoneCat[index],
                        ['data']: element,
                        ['color']: colorsXX[index]
                    };
                }));

                zonalssiChartTrend(zonalssiLucifer);
                zonalssiChartTrends2(zonalssiLucifer2);

                zonalnpsChartTrend(zonalnpsLucifer);
                zonalnpsChartTrends2(zonalnpsLucifer2);
            }
        });
    }

    function nintyoneAjax(condX, timeVal, regionVal,tablecondX) {
        ////debugger;
        if (regionVal.length == 0) {
            //regionVal = ['Overall','East 1','East 2','East 3','Central 1','Central 2','Central 3','North 1','North 2','North 3','West 1','West 2','West 3','West 4','South 1','South 2','South 3','South 4'];
            if (userType == 1) {
                regionVal = ['Overall', 'East 1', 'East 2', 'East 3', 'Central 1', 'Central 2', 'Central 3', 'North 1',
                    'North 2', 'North 3', 'West 1', 'West 2', 'West 3', 'West 4', 'South 1', 'South 2', 'South 3',
                    'South 4'
                ];
            }
            if (userType == 2) {
                regionVal = ['Overall', 'North 1', 'North 2', 'North 3'];
            }
            if (userType == 3) {
                regionVal = ['Overall', 'South 1', 'South 2', 'South 3', 'South 4'];
            }
            if (userType == 4) {
                regionVal = ['Overall', 'East 1', 'East 2', 'East 3'];
            }
            if (userType == 5) {
                regionVal = ['Overall', 'West 1', 'West 2', 'West 3', 'West 4'];
            }
            if (userType == 6) {
                regionVal = ['Overall', 'Central 1', 'Central 2', 'Central 3'];
            }
            if (userType >= 7 && userType <= 23) {
                regionVal = ['Overall'];
                var rgAAr = {
                    7: "Central 1",
                    8: "Central 2",
                    9: "Central 3",
                    10: "North 1 ",
                    11: "North 2 ",
                    12: "North 3",
                    13: "East 1 ",
                    14: "East 2",
                    15: "East 3",
                    16: "West 1",
                    17: "West 2",
                    18: "West 3",
                    19: "West 4",
                    20: "South 1",
                    21: "South 2",
                    22: "South 3",
                    23: "South 4"
                };
                regionVal.push(rgAAr[userType]);
            }
        } else {
            regionVal.unshift("Overall");
        }
        $.ajax({
            url: "api/ajax91.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'regionVal': regionVal,
                'tablecondX': tablecondX
            },

            success: function(response) {
                ////debugger;
                var data = JSON.parse(response);
                console.log("Hiii");
                console.log(data);

                var dataZonalssi = data['ssi'];

                var colorsXX = ['#A6A6A6', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99',
                    '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99',
                    '#004D99', '#004D99', '#004D99', '#004D99', '#004D99'
                ];

                var arr = [];
                for (var k = 0; k < dataZonalssi[0].length; k++) {
                    var arr2 = [];
                    for (var j = 0; j < dataZonalssi.length; j++) {
                        arr2.push(dataZonalssi[j][k])
                    }
                    arr.push(arr2);
                }

                var zoneCat = regionVal;
                console.log(dataZonalssi);
                var zonalssiLucifer = Object.assign(arr.map(function(element, index) {
                    return {
                        ['name']: zoneCat[index],
                        ['data']: element,

                    };
                }));

                var zonalssiLucifer2 = Object.assign(arr.map(function(element, index) {
                    return {
                        ['name']: zoneCat[index],
                        ['data']: element,
                        ['color']: colorsXX[index]
                    };
                }));

                var dataZonalnps = data['nps'];
                var zoneCat = regionVal;

                var arr3 = [];
                for (var k = 0; k < dataZonalnps[0].length; k++) {
                    var arr4 = [];
                    for (var j = 0; j < dataZonalnps.length; j++) {
                        arr4.push(dataZonalnps[j][k])
                    }
                    arr3.push(arr4);
                }

                var zonalnpsLucifer = Object.assign(arr3.map(function(element, index) {
                    return {
                        ['name']: zoneCat[index],
                        ['data']: element,

                    };
                }));


                var zonalnpsLucifer2 = Object.assign(arr3.map(function(element, index) {
                    return {
                        ['name']: zoneCat[index],
                        ['data']: element,
                        ['color']: colorsXX[index]
                    };
                }));

                regionssiChartTrend(zonalssiLucifer);
                regionssiChartTrends2(zonalssiLucifer2);
                regionnpsChartTrend(zonalnpsLucifer);
                regionnpsChartTrends2(zonalnpsLucifer2);
            }

        });
    }

    function twelveAjax(condX, timeVal, tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajax12.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },

            success: function(response) {
                var data = JSON.parse(response);
                var dataHyundaiwebsite = [];
                var dataCtbwebsite = [];

                var dizioverallV = [data['dizioverall']];
                var Q11V = data['q11'];
                var Q12V = data['q12'];
                var Q13V = data['q13'];
                var Q14V = data['q14'];

                var Q15V = data['q15'];
                var Q15aV = data['q15a'];
                var Q15cV = data['q15c'];
                var Q15bV = data['q15b'];
                var Q15dV = data['q15d'];

                dataHyundaiwebsite.push(Q11V);
                dataHyundaiwebsite.push(Q12V);
                dataHyundaiwebsite.push(Q13V);
                dataHyundaiwebsite.push(Q14V);

                dataCtbwebsite.push(Q15V);
                dataCtbwebsite.push(Q15aV);
                dataCtbwebsite.push(Q15cV);
                dataCtbwebsite.push(Q15dV);
                dataCtbwebsite.push(Q15bV);


                var diziLucifer = Object.assign(dizioverallV.map(function(element, index) {
                    return {
                        ['name']: ["Digitization"],
                        ['data']: element
                    };
                }));

                var diziLucifer2 = Object.assign(dizioverallV.map(function(element, index) {
                    return {
                        ['name']: ["Digitization"],
                        ['data']: element,
                        ['color']: colors[index]
                    };
                }));

                var hyundaiwebsiteTrendsCat = ['% visited Hyundai India website before final purchase',
                    '% Satisfied with Design and Appearance',
                    '% Satisfied with Ease of Viewing and Navigation',
                    '% Satisfied Completeness of Vehical Information & Dealership\'s Contact Information'
                ];
                var hyundaiwebsiteLucifer = Object.assign(dataHyundaiwebsite.map(function(element, index) {
                    return {
                        ['name']: hyundaiwebsiteTrendsCat[index],
                        ['data']: element
                    };
                }));
                var hyundaiwebsiteLucifer2 = Object.assign(dataHyundaiwebsite.map(function(element, index) {
                    return {
                        ['name']: hyundaiwebsiteTrendsCat[index],
                        ['data']: element,
                        ['color']: colors[index]
                    };
                }));

                var ctbwebsiteTrendsCat = ['% informed about availbility of CTB',
                    '% opted for CTB option for car boooking',
                    '% opted for online finance via CTB website',
                    '% Satisfied with Experience on CTB Website On Financing & Generating Quotes',
                    '% Satisfied with Experience on CTB Website While Booking the Car'
                ];

                var ctbwebsiteLucifer = Object.assign(dataCtbwebsite.map(function(element, index) {
                    return {
                        ['name']: ctbwebsiteTrendsCat[index],
                        ['data']: element
                    };
                }));

                var ctbwebsiteLucifer2 = Object.assign(dataCtbwebsite.map(function(element, index) {
                    return {
                        ['name']: ctbwebsiteTrendsCat[index],
                        ['data']: element,
                        ['color']: colors[index]
                    };
                }));


                setTimeout(() => {
                    dizioverallTrend(diziLucifer);
                    hyundaiwebsiteTrend(hyundaiwebsiteLucifer);
                    ctbwebsiteTrend(ctbwebsiteLucifer);
                    dizioverallTrend2(diziLucifer2);
                    hyundaiwebsiteTrend2(hyundaiwebsiteLucifer2);
                    ctbwebsiteTrend2(ctbwebsiteLucifer2);
                }, 1000);
            }

        });
    }

    function thirteenAjax(condX, timeVal, tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajax13.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },

            success: function(response) {
                var data = JSON.parse(response);
                var FV_arr = [];
                var F1V = data['f1'];
                var F2V = data['f2'];
                var F3V = data['f3'];
                var F4V = data['f4'];
                var F5V = data['f5'];
                var F6V = data['f6'];

                FV_arr.push(F1V);
                FV_arr.push(F2V);
                FV_arr.push(F3V);
                FV_arr.push(F4V);
                FV_arr.push(F5V);
                FV_arr.push(F6V);
                var colorsXX = ['#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99'];
                var factorTrendsCat = ['Digitization', 'Dealer Facility', 'Sales Consultant', 'Deal',
                    'Paperwork', 'Delivery'
                ];
                var factorLucifer = Object.assign(FV_arr.map(function(element, index) {
                    return {
                        ['name']: factorTrendsCat[index],
                        ['data']: element
                    };
                }));
                console.log(factorLucifer);
                var factorLucifer2 = Object.assign(FV_arr.map(function(element, index) {
                    return {
                        ['name']: factorTrendsCat[index],
                        ['data']: element,
                        ['color']: colorsXX[index]
                    };
                }));
                console.log(factorLucifer2);
                setTimeout(() => {
                    factorTrend(factorLucifer);
                    factorTrend2(factorLucifer2);
                }, 1000);
            }

        });
    }

    function fourteenAjax(condX, timeVal, tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajax14.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },

            success: function(response) {
                var data = JSON.parse(response);
                var dataFacility = [];
                var dataoverallFacility = [data['overallfacility']];
                console.log("fourteenAjax");
                console.log(data);
                var Q18aV = data['Q18a'];
                var Q18cV = data['Q18c'];
                var Q18dV = data['Q18d'];
                var Q17bV = [data['Q17b']];

                dataFacility.push(Q18aV);
                dataFacility.push(Q18cV);
                dataFacility.push(Q18dV);

                var facilityTrendsCat = ['Non-availability of parking space',
                    'Showroom cleanliness not as per expectations',
                    'Quality of amenities not as per expectations'
                ];
                var facilityoverallLucifer = Object.assign(dataoverallFacility.map(function(element,
                    index) {
                    return {
                        ['name']: "Overall",
                        ['data']: element
                    };
                }));
                var Q17bLucifer = Object.assign(Q17bV.map(function(element, index) {
                    return {
                        ['name']: "Overall % count respondents coded 1-8 in experience of Facility/ Infrastructure",
                        ['data']: element
                    };
                }));
                var Q17bLucifer2 = Object.assign(Q17bV.map(function(element, index) {
                    return {
                        ['name']: "Overall % count respondents coded 1-8 in experience of Facility/ Infrastructure",
                        ['data']: element,
                        ['color']: colors[index]
                    };
                }));
                var facilityoverallLucifer2 = Object.assign(dataoverallFacility.map(function(element,
                    index) {
                    return {
                        ['name']: "Overall",
                        ['data']: element,
                        ['color']: colors[index]
                    };
                }));

                var facilityLucifer = Object.assign(dataFacility.map(function(element, index) {
                    return {
                        ['name']: facilityTrendsCat[index],
                        ['data']: element
                    };
                }));

                var facilityLucifer2 = Object.assign(dataFacility.map(function(element, index) {
                    return {
                        ['name']: facilityTrendsCat[index],
                        ['data']: element,
                        ['color']: colors[index]
                    };
                }));


                setTimeout(() => {
                    facilityTrend(facilityLucifer);
                    facilityoverallTrend(facilityoverallLucifer);
                    facilityTrend2(facilityLucifer2);
                    facilityoverallTrend2(facilityoverallLucifer2);
                    facilityQ17b(Q17bLucifer);
                    facilityQ17b2(Q17bLucifer2);

                }, 1000);
            }

        });
    }

    function fifteenAjax(condX, timeVal, tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajax15.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },

            success: function(response) {
                var data = JSON.parse(response);

                var dataSalesyes = [];
                var dataSalesno = [];
                var overallSalesyesV = [data['scSSI']];

                var Q19V = [data['Q19']];

                var Q19a1V = data['Q19a1'];
                var Q19a2V = data['Q19a2'];
                var Q19a3V = data['Q19a3'];
                var Q19eV = data['Q19e'];
                var Q19e3V = data['Q19e3'];
                var Q19fV = data['Q19f'];
                var Q23aV = data['Q23a'];
                var Q19e2OV = [data['Q19e2O']];

                var Q19aV = data['Q19a'];
                var Q19bV = data['Q19b'];
                var Q19dV = data['Q19d'];

                dataSalesyes.push(Q19a1V);
                dataSalesyes.push(Q19a2V);
                dataSalesyes.push(Q19a3V);
                dataSalesyes.push(Q19eV);
                dataSalesyes.push(Q19fV);
                dataSalesyes.push(Q19e3V);
                dataSalesyes.push(Q23aV);
                


                dataSalesno.push(Q19aV);
                dataSalesno.push(Q19bV);
                dataSalesno.push(Q19dV);

                var salesyesCat = <?php echo json_encode($sales_yesN); ?>;
                var salesyesLucifer = Object.assign(dataSalesyes.map(function(element, index) {
                    return {
                        ['name']: salesyesCat[index],
                        ['data']: element
                    };
                }));

                var salesyesLucifer2 = Object.assign(dataSalesyes.map(function(element, index) {
                    return {
                        ['name']: salesyesCat[index],
                        ['data']: element,
                        ['color']: colors[index]
                    };
                }));

                var salesnoCat = ['Sales Consultant met within reasonable time',
                    'Sales Consultant used digital device',
                    'Sales Consultant asked question on prefered model/features/options'
                ];
                var salesnoLucifer = Object.assign(dataSalesno.map(function(element, index) {
                    return {
                        ['name']: salesnoCat[index],
                        ['data']: element
                    };
                }));

                var salesnoLucifer2 = Object.assign(dataSalesno.map(function(element, index) {
                    return {
                        ['name']: salesnoCat[index],
                        ['data']: element,
                        ['color']: colors[index]
                    };
                }));

                var salesoverallyesLucifer = Object.assign(overallSalesyesV.map(function(element, index) {
                    return {
                        ['name']: "Overall",
                        ['data']: element,
                    };
                }));

                var salesoverallyesLucifer2 = Object.assign(overallSalesyesV.map(function(element, index) {
                    return {
                        ['name']: "Overall",
                        ['data']: element,
                        ['color']: colors[index]
                    };
                }));

                var Q19e2OVLucifer = Object.assign(Q19e2OV.map(function(element, index) {
                    return {
                        ['name']: "Demo of the car by Sales Person",
                        ['data']: element,
                    };
                }));

                var Q19e2OVLucifer2 = Object.assign(Q19e2OV.map(function(element, index) {
                    return {
                        ['name']: "Demo of the car by Sales Person",
                        ['data']: element,
                        ['color']: colors[index]
                    };
                }));

                var Q19VLucifer = Object.assign(Q19V.map(function(element, index) {
                    return {
                        ['name']: "Overall % count respondents coded 1-8 in experience of Sales Consultant",
                        ['data']: element,
                    };
                }));

                var Q19VLucifer2 = Object.assign(Q19V.map(function(element, index) {
                    return {
                        ['name']: "Overall % count respondents coded 1-8 in experience of Sales Consultant",
                        ['data']: element,
                        ['color']: colors[index]
                    };
                }));




                setTimeout(() => {
                    salesoverallTrend(salesoverallyesLucifer);
                    salesyesTrend(salesyesLucifer);
                    salesnoTrend(salesnoLucifer);
                    salesoverallTrend2(salesoverallyesLucifer2);
                    salesyesTrend2(salesyesLucifer2);
                    salesnoTrend2(salesnoLucifer2);

                    Q19e2OTrend(Q19e2OVLucifer);

                    Q19e2OTrend2(Q19e2OVLucifer2);

                    Q19Trend(Q19VLucifer);

                    Q19Trend2(Q19VLucifer2);
                }, 1000);
            }

        });
    }

    function sixteenAjax(condX, timeVal, tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajax16.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },

            success: function(response) {
                var data = JSON.parse(response);

                var datadriveexp = [];
                var Q23V = [];
                var Q20V = data['Q20'];
                var Q21V = [data['Q21']];
                var Q22OV = data['Q22O'];
                var Q23aV = data['Q23a'];
                var Q23bV = data['Q23b'];
                var Q23cV = data['Q23c'];
                console.log(Q23V);

                datadriveexp.push(Q20V);
                datadriveexp.push(Q22OV);

                Q23V.push(Q23aV);
                Q23V.push(Q23bV);
                Q23V.push(Q23cV);

                var driveexpCat = ['% Offered test drive', 'Overall Experience of Test Drive'];
                var driveexpLucifer = Object.assign(datadriveexp.map(function(element, index) {
                    return {
                        ['name']: driveexpCat[index],
                        ['data']: element
                    };
                }));

                var driveexpLucifer2 = Object.assign(datadriveexp.map(function(element, index) {
                    return {
                        ['name']: driveexpCat[index],
                        ['data']: element,
                        ['color']: colors[index]
                    };
                }));

                var drivedealerCat = ['% took test drive at the dealership from vehical was purchased'];
                var drivedealerLucifer = Object.assign(Q21V.map(function(element, index) {
                    return {
                        ['name']: drivedealerCat[index],
                        ['data']: element
                    };
                }));
                console.log(drivedealerLucifer);
                var drivedealerLucifer2 = Object.assign(Q21V.map(function(element, index) {
                    return {
                        ['name']: drivedealerCat[index],
                        ['data']: element,
                        ['color']: colors[index]
                    };
                }));
                console.log(drivedealerLucifer2);

                var drivereasonCat = ['Test drive at another dealership', 'Didn\'t want /need test drive',
                    'Test drive vehicle was unavailable'
                ];

                var drivereasonLucifer = Object.assign(Q23V.map(function(element, index) {
                    return {
                        ['name']: drivereasonCat[index],
                        ['data']: element
                    };
                }));
                console.log(drivereasonLucifer);
                var drivereasonLucifer2 = Object.assign(Q23V.map(function(element, index) {
                    return {
                        ['name']: drivereasonCat[index],
                        ['data']: element,
                        ['color']: colors[index]
                    };
                }));
                console.log(drivereasonLucifer2);
                setTimeout(() => {
                    driveexpTrend(driveexpLucifer);
                    drivedealerTrend(drivedealerLucifer);
                    drivereasonTrend(drivereasonLucifer);
                    driveexpTrend2(driveexpLucifer2);
                    drivedealerTrend2(drivedealerLucifer2);
                    drivereasonTrend2(drivereasonLucifer2);
                }, 1000);
            }

        });
    }

    function seventeenAjax(condX, timeVal, tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajax17.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },

            success: function(response) {
                var data = JSON.parse(response);
                var dataDeal = [];

                var overalldealV = [data['overalldeal']];
                var Q25bV = data['Q25b'];
                var Q25cV = data['Q25c'];
                var Q25dV = data['Q25d'];
                var Q25eV = data['Q25e'];
                var Q24V = [data['Q24']];

                dataDeal.push(Q25bV);
                dataDeal.push(Q25cV);
                dataDeal.push(Q25dV);
                dataDeal.push(Q25eV);

                var dealCat = ["Difficulty in Getting Cost of Vehicle", "Changed the Promised Price",
                    "Information of Upcoming Price Hike", "Pressure for purchase"
                ];
                var dealLucifer = Object.assign(dataDeal.map(function(element, index) {
                    return {
                        ['name']: dealCat[index],
                        ['data']: element
                    };
                }));

                var dealLucifer2 = Object.assign(dataDeal.map(function(element, index) {
                    return {
                        ['name']: dealCat[index],
                        ['data']: element,
                        ['color']: colors[index]
                    };
                }));

                var dealoverallLucifer = Object.assign(overalldealV.map(function(element, index) {
                    return {
                        ['name']: "Overall",
                        ['data']: element,
                    };
                }));

                var dealoverallLucifer2 = Object.assign(overalldealV.map(function(element, index) {
                    return {
                        ['name']: "Overall",
                        ['data']: element,
                        ['color']: colors[index]
                    };
                }));

                var q24Lucifer = Object.assign(Q24V.map(function(element, index) {
                    return {
                        ['name']: "Overall % count respondents coded 1-8 in experience of Deal Diagnostics",
                        ['data']: element,
                    };
                }));

                var q24Lucifer2 = Object.assign(Q24V.map(function(element, index) {
                    return {
                        ['name']: "Overall % count respondents coded 1-8 in experience of Deal Diagnostics",
                        ['data']: element,
                        ['color']: colors[index]
                    };
                }));

                setTimeout(() => {
                    dealTrend(dealLucifer);
                    dealoverallTrend(dealoverallLucifer);
                    dealTrend2(dealLucifer2);
                    dealoverallTrend2(dealoverallLucifer2);

                    q24Trend(q24Lucifer);

                    q24Trend2(q24Lucifer2);

                }, 1000);
            }

        });
    }

    function eighteenAjax(condX, timeVal, tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajax18.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },

            success: function(response) {
                var data = JSON.parse(response);

                var datapapertime = [];
                var datapaperprocess = [];
                var datapaperdiagnos = [];

                var dataoverallPaper = [data['overallpaper']];
                var Q26a1V = data['Q26A_1'];
                var Q26a2V = data['Q26A_2'];
                var Q26a3V = data['Q26A_3'];

                var Q26b1V = data['Q26B_1'];
                var Q26b2V = data['Q26B_2'];
                var Q26b3V = data['Q26B_3'];

                var Q26CV = data['Q26C'];
                var Q26DV = data['Q26D'];
                var Q26EV = data['Q26E'];

                var Q26NV = [data['Q26N']];


                datapapertime.push(Q26a1V);
                datapapertime.push(Q26a2V);
                datapapertime.push(Q26a3V);

                datapaperprocess.push(Q26b1V);
                datapaperprocess.push(Q26b2V);
                datapaperprocess.push(Q26b3V);

                datapaperdiagnos.push(Q26CV);
                datapaperdiagnos.push(Q26DV);
                datapaperdiagnos.push(Q26EV);

                var paperoverallLucifer = Object.assign(dataoverallPaper.map(function(element, index) {
                    return {
                        ['name']: "Overall",
                        ['data']: element
                    };
                }));

                var paperoverallLucifer2 = Object.assign(dataoverallPaper.map(function(element, index) {
                    return {
                        ['name']: "Overall",
                        ['data']: element,
                        ['color']: colors[index]
                    };
                }));

                var q26Lucifer = Object.assign(Q26NV.map(function(element, index) {
                    return {
                        ['name']: "Overall % count respondents coded 1-8 in experience of Paperwork",
                        ['data']: element
                    };
                }));

                var q26Lucifer2 = Object.assign(Q26NV.map(function(element, index) {
                    return {
                        ['name']: "Overall % count respondents coded 1-8 in experience of Paperwork",
                        ['data']: element,
                        ['color']: colors[index]
                    };
                }));

                var papertimeCat = ["More than My Expectations", "Same as My Expectations",
                    "Less than My Expectations"
                ];

                var papertimeLucifer = Object.assign(datapapertime.map(function(element, index) {
                    return {
                        ['name']: papertimeCat[index],
                        ['data']: element
                    };
                }));

                var papertimeLucifer2 = Object.assign(datapapertime.map(function(element, index) {
                    return {
                        ['name']: papertimeCat[index],
                        ['data']: element,
                        ['color']: colors[index]
                    };
                }));

                var paperprocessCat = ["Explained with fully clarity", "Explained somewhat clearly",
                    "Did not explain clearly at all"
                ];
                var paperprocessLucifer = Object.assign(datapaperprocess.map(function(element, index) {
                    return {
                        ['name']: paperprocessCat[index],
                        ['data']: element
                    };
                }));

                var paperprocessLucifer2 = Object.assign(datapaperprocess.map(function(element, index) {
                    return {
                        ['name']: paperprocessCat[index],
                        ['data']: element,
                        ['color']: colors[index]
                    };
                }));

                var paperdiagnosCat = ["Pressure for Purchase of additional Products",
                    "Addition of Non agreed products", "Follow-up/Return for Paperwork Problems"
                ];
                var paperdiagnosLucifer = Object.assign(datapaperdiagnos.map(function(element, index) {
                    return {
                        ['name']: paperdiagnosCat[index],
                        ['data']: element
                    };
                }));

                var paperdiagnosLucifer2 = Object.assign(datapaperdiagnos.map(function(element, index) {
                    return {
                        ['name']: paperdiagnosCat[index],
                        ['data']: element,
                        ['color']: colors[index]
                    };
                }));

                setTimeout(() => {
                    paperoverallTrend(paperoverallLucifer);
                    paperoverallTrend2(paperoverallLucifer2);

                    papertimeTrend(papertimeLucifer);
                    papertimeTrend2(papertimeLucifer2);

                    paperprocessTrend(paperprocessLucifer);
                    paperdiagnosTrend(paperdiagnosLucifer);

                    paperprocessTrend2(paperprocessLucifer2);
                    paperdiagnosTrend2(paperdiagnosLucifer2);

                    paperq26NTrend(q26Lucifer);
                    paperq26NTrend2(q26Lucifer2);

                }, 1000);
            }

        });
    }

    function nineteenAjax(condX, timeVal, tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajax19.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },

            success: function(response) {
                var data = JSON.parse(response);
                console.log("hiii19");
                console.log(data);
                var datadeliverycond = [];
                var datadeliveryquality = [];
                var datadeliverytime = [];
                var datadeliveryservice = [data['Q28d_3_arr']];
                var datadeliverydiagnos = [];

                var dataoverallDelivery = [data['deSSIV_arr']];

                var Q27V = [data['Q27']];
                console.log("Q27");
                console.log(Q27V);

                var Q28A_1V = data['Q28A_1_arr'];
                var Q28A_2V = data['Q28A_2_arr'];
                var Q28A_3V = data['Q28A_3_arr'];
                var Q28A_4V = data['Q28A_4_arr'];

                var Q28B_1V = data['Q28B_1_arr'];
                var Q28B_2V = data['Q28B_2_arr'];
                var Q28B_3V = data['Q28B_3_arr'];

                var Q28E_1V = data['Q28E_1_arr'];
                var Q28E_2V = data['Q28E_2_arr'];
                var Q28E_3V = data['Q28E_3_arr'];

                var Q29V = data['Q29_arr'];
                var Q30V = data['Q30_arr'];
                var Q31V = data['Q31_arr'];
                var Q33V = data['Q33_arr'];
                var Q34V = data['Q34_arr'];

                datadeliverycond.push(Q28A_1V);
                datadeliverycond.push(Q28A_2V);
                datadeliverycond.push(Q28A_3V);
                datadeliverycond.push(Q28A_4V);

                datadeliveryquality.push(Q28B_1V);
                datadeliveryquality.push(Q28B_2V);
                datadeliveryquality.push(Q28B_3V);

                datadeliverytime.push(Q28E_1V);
                datadeliverytime.push(Q28E_2V);
                datadeliverytime.push(Q28E_3V);

                datadeliverydiagnos.push(Q29V);
                datadeliverydiagnos.push(Q30V);
                datadeliverydiagnos.push(Q31V);
                datadeliverydiagnos.push(Q33V);
                datadeliverydiagnos.push(Q34V);


                var deliverycondCat = ["Vehicle was delivered with no issues", "Vehicle was not clean",
                    "Vehicle was not fitted", "Vehicle had dents/scratches"
                ];
                var deliverycondLucifer = Object.assign(datadeliverycond.map(function(element, index) {
                    return {
                        ['name']: deliverycondCat[index],
                        ['data']: element
                    };
                }));

                var deliverycondLucifer2 = Object.assign(datadeliverycond.map(function(element, index) {
                    return {
                        ['name']: deliverycondCat[index],
                        ['data']: element,
                        ['color']: colors[index]
                    };
                }));

                var deliveryqualityCat = ["Explained in Detail", "Explained Somewhat", "Poor Explanation"];
                var deliveryqualityLucifer = Object.assign(datadeliveryquality.map(function(element,
                    index) {
                    return {
                        ['name']: deliveryqualityCat[index],
                        ['data']: element
                    };
                }));

                var deliveryqualityLucifer2 = Object.assign(datadeliveryquality.map(function(element,
                    index) {
                    return {
                        ['name']: deliveryqualityCat[index],
                        ['data']: element,
                        ['color']: colors[index]
                    };
                }));

                var deliverytimeCat = ["TIme taken was faster than what i expected",
                    "Time taken was same as what i expected", "Took longer than i expected"
                ];
                var deliverytimeLucifer = Object.assign(datadeliverytime.map(function(element, index) {
                    return {
                        ['name']: deliverytimeCat[index],
                        ['data']: element
                    };
                }));

                var deliverytimeLucifer2 = Object.assign(datadeliverytime.map(function(element, index) {
                    return {
                        ['name']: deliverytimeCat[index],
                        ['data']: element,
                        ['color']: colors[index]
                    };
                }));

                var deliveryserviceCat = ["Service"];
                var deliveryserviceLucifer = Object.assign(datadeliveryservice.map(function(element,
                    index) {
                    return {
                        ['name']: deliveryserviceCat[index],
                        ['data']: element
                    };
                }));

                var deliveryserviceLucifer2 = Object.assign(datadeliveryservice.map(function(element,
                    index) {
                    return {
                        ['name']: deliveryserviceCat[index],
                        ['data']: element,
                        ['color']: colors[index]
                    };
                }));

                var deliveryoverallLucifer = Object.assign(dataoverallDelivery.map(function(element,
                    index) {
                    return {
                        ['name']: "Overall",
                        ['data']: element
                    };
                }));

                var deliveryoverallLucifer2 = Object.assign(dataoverallDelivery.map(function(element,
                    index) {
                    return {
                        ['name']: "Overall",
                        ['data']: element,
                        ['color']: colors[index]
                    };
                }));

                var q27Lucifer = Object.assign(Q27V.map(function(element, index) {
                    return {
                        ['name']: "Overall % count respondents coded 1-8 in experience of delivery of new vehicle",
                        ['data']: element
                    };
                }));

                var q27Lucifer2 = Object.assign(Q27V.map(function(element, index) {
                    return {
                        ['name']: "Overall % count respondents coded 1-8 in experience of delivery of new vehicle",
                        ['data']: element,
                        ['color']: colors[index]
                    };
                }));


                console.log("q27Lucifer");
                console.log(q27Lucifer);

                console.log("q27Lucifer2");
                console.log(q27Lucifer2);

                var deliverydiagnosCat = ["Agree for Home Delivery", "Informed of Delivery Status",
                    "Delivered with all Promised Features", "Delivery with Ceremony",
                    "Follow-up after Delivery"
                ];
                var deliverydiagnosLucifer = Object.assign(datadeliverydiagnos.map(function(element,
                    index) {
                    return {
                        ['name']: deliverydiagnosCat[index],
                        ['data']: element
                    };
                }));

                var deliverydiagnosLucifer2 = Object.assign(datadeliverydiagnos.map(function(element,
                    index) {
                    return {
                        ['name']: deliverydiagnosCat[index],
                        ['data']: element,
                        ['color']: colors[index]
                    };
                }));

                setTimeout(() => {

                    deliveryoverallTrend(deliveryoverallLucifer);
                    deliverycondTrend(deliverycondLucifer);
                    deliveryqualityTrend(deliveryqualityLucifer);
                    deliverytimeTrend(deliverytimeLucifer);
                    deliveryserviceTrend(deliveryserviceLucifer);
                    deliverydiagnosTrend(deliverydiagnosLucifer);

                    deliveryoverallTrend2(deliveryoverallLucifer2);
                    deliverycondTrend2(deliverycondLucifer2);
                    deliveryqualityTrend2(deliveryqualityLucifer2);
                    deliverytimeTrend2(deliverytimeLucifer2);
                    deliveryserviceTrend2(deliveryserviceLucifer2);
                    deliverydiagnosTrend2(deliverydiagnosLucifer2);

                    q27Trend(q27Lucifer);
                    q27Trend2(q27Lucifer2);
                }, 1000);
            }

        });
    }

    function twentyAjax(condX, timeVal, tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajax20.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },

            success: function(response) {
                var data = JSON.parse(response);
                var dataheart = [];

                var hostV = data['host'];
                var empathyV = data['empathy'];
                var anticipateV = data['anticipate'];
                var respectV = data['respect'];
                var thanksV = data['thanks'];

                dataheart.push(hostV);
                dataheart.push(empathyV);
                dataheart.push(anticipateV);
                dataheart.push(respectV);
                dataheart.push(thanksV);

                var heartCat = ["Host", "Empathy", "Anticipate", "Respect", "Thanks"];
                var heartLucifer = Object.assign(dataheart.map(function(element, index) {
                    return {
                        ['name']: heartCat[index],
                        ['data']: element
                    };
                }));

                var heartLucifer2 = Object.assign(dataheart.map(function(element, index) {
                    return {
                        ['name']: heartCat[index],
                        ['data']: element,
                        ['color']: colors[index]
                    };
                }));

                setTimeout(() => {
                    heartTrend(heartLucifer);
                    heartTrend2(heartLucifer2);
                }, 1000);
            }

        });
    }

    function twentythreeAjax(condX, timeVal, zoneVal, tablecondX) {
        //debugger;
        if (zoneVal.length == 0) {
            zoneVal = ['Overall', 'Central', 'South', 'North', 'East', 'West'];
        } else {
            if (zoneVal.indexOf("Overall") < 0) {
                zoneVal.unshift("Overall");
            }
        }
        $.ajax({
            url: "api/ajax23.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'zoneVal': zoneVal,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },
            success: function(response) {
                //debugger;
                var data = JSON.parse(response);
                console.log("ZOnal test");
                console.log(data);
                var zonalSSIData = data['ssi'];
                var zonalNPSData = data['nps'];

                zonalNPSLuciferPPTlabel = [];
                zonalNPSLuciferPPTvalue = [];
                zonalSSILuciferPPTlabel = [];
                zonalSSILuciferPPTvalue = [];

                var zonalNPS2 = zonalNPSData.map(function(element, index, arr) {
                    return {
                        ['name']: zoneVal[index],
                        ['data']: element
                    }
                });
                zonalNPS2.sort((a, b) => b['data'] - a['data']);

                var zonalSSI2 = zonalSSIData.map(function(element, index, arr) {
                    return {
                        ['name']: zoneVal[index],
                        ['data']: element
                    }
                });
                zonalSSI2.sort((a, b) => b['data'] - a['data']);



                for (var i = 0; i < zonalNPS2.length; i++) {
                    if (zonalNPS2[i].name == "Overall") {
                        var x = zonalNPS2[i];
                        zonalNPS2.splice(i, 1);
                        zonalNPS2.splice(0, 0, x);
                        break;
                    }
                }

                for (var i = 0; i < zonalSSI2.length; i++) {
                    if (zonalSSI2[i].name == "Overall") {
                        var x = zonalSSI2[i];
                        zonalSSI2.splice(i, 1);
                        zonalSSI2.splice(0, 0, x);
                        break;
                    }
                }



                var newValue = [];
                var newCat = [];

                var newValue2 = [];
                var newCat2 = [];

                for (var x = 0; x < zonalNPS2.length; x++) {
                    newValue.push(zonalNPS2[x].data);
                    newCat.push(zonalNPS2[x].name);
                }

                for (var x = 0; x < zonalSSI2.length; x++) {
                    newValue2.push(zonalSSI2[x].data);
                    newCat2.push(zonalSSI2[x].name);
                }

                console.log(newValue);
                console.log(newCat);

                var zonalNPSLucifer = newValue.map(function(element, index, arr) {
                    return {
                        ['name']: "NPS",
                        ['data']: arr
                    }
                });

                var zonalSSILucifer = newValue2.map(function(element, index, arr) {
                    return {
                        ['name']: "SSI",
                        ['data']: arr
                    }
                });

                zonalNPSLuciferPPTlabel = newCat;
                zonalNPSLuciferPPTvalue = newValue;

                zonalSSILuciferPPTlabel = newCat2;
                zonalSSILuciferPPTvalue = newValue2;


                setTimeout(() => {
                    zonalChart(zonalNPSLucifer, newCat);
                    zonalChart2(zonalSSILucifer, newCat2);
                }, 1000);
            }

        });
    }

    function twentyfourAjax(condX, timeVal, regionVal, tablecondX) {

        if (regionVal.length == 0) {
            //regionVal = ['Overall','East 1','East 2','East 3','Central 1','Central 2','Central 3','North 1','North 2','North 3','West 1','West 2','West 3','West 4','South 1','South 2','South 3','South 4'];
            if (userType == 1) {
                regionVal = ['Overall', 'East 1', 'East 2', 'East 3', 'Central 1', 'Central 2', 'Central 3', 'North 1',
                    'North 2', 'North 3', 'West 1', 'West 2', 'West 3', 'West 4', 'South 1', 'South 2', 'South 3',
                    'South 4'
                ];
            }
            if (userType == 2) {
                regionVal = ['Overall', 'North 1', 'North 2', 'North 3'];
            }
            if (userType == 3) {
                regionVal = ['Overall', 'South 1', 'South 2', 'South 3', 'South 4'];
            }
            if (userType == 4) {
                regionVal = ['Overall', 'East 1', 'East 2', 'East 3'];
            }
            if (userType == 5) {
                regionVal = ['Overall', 'West 1', 'West 2', 'West 3', 'West 4'];
            }
            if (userType == 6) {
                regionVal = ['Overall', 'Central 1', 'Central 2', 'Central 3'];
            }
            if (userType >= 7 && userType <= 23) {
                regionVal = ['Overall'];
                var rgAAr = {
                    7: "Central 1",
                    8: "Central 2",
                    9: "Central 3",
                    10: "North 1 ",
                    11: "North 2 ",
                    12: "North 3",
                    13: "East 1 ",
                    14: "East 2",
                    15: "East 3",
                    16: "West 1",
                    17: "West 2",
                    18: "West 3",
                    19: "West 4",
                    20: "South 1",
                    21: "South 2",
                    22: "South 3",
                    23: "South 4"
                };
                regionVal.push(rgAAr[userType]);
            }
        } else {
            if (regionVal.indexOf("Overall") < 0) {
                regionVal.unshift("Overall");
            }

        }
        $.ajax({
            url: "api/ajax24.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'regionVal': regionVal,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },

            success: function(response) {
                var data = JSON.parse(response);
                console.log(data);

                var regionSSIData = data['ssi'];
                var regionNPSData = data['nps'];

                regionalNPSLuciferPPTlabel = [];
                regionalNPSLuciferPPTvalue = [];
                regionalSSILuciferPPTlabel = [];
                regionalSSILuciferPPTvalue = [];


                var regionNPS2 = regionNPSData.map(function(element, index, arr) {
                    return {
                        ['name']: regionVal[index],
                        ['data']: element
                    }
                });
                regionNPS2.sort((a, b) => b['data'] - a['data']);

                var regionSSI2 = regionSSIData.map(function(element, index, arr) {
                    return {
                        ['name']: regionVal[index],
                        ['data']: element
                    }
                });
                regionSSI2.sort((a, b) => b['data'] - a['data']);

                for (var i = 0; i < regionNPS2.length; i++) {
                    if (regionNPS2[i].name == "Overall") {
                        var x = regionNPS2[i];
                        regionNPS2.splice(i, 1);
                        regionNPS2.splice(0, 0, x);
                        break;
                    }
                }

                for (var i = 0; i < regionSSI2.length; i++) {
                    if (regionSSI2[i].name == "Overall") {
                        var x = regionSSI2[i];
                        regionSSI2.splice(i, 1);
                        regionSSI2.splice(0, 0, x);
                        break;
                    }
                }

                var newValue = [];
                var newCat = [];

                var newValue2 = [];
                var newCat2 = [];

                for (var x = 0; x < regionNPS2.length; x++) {
                    newValue.push(regionNPS2[x].data);
                    newCat.push(regionNPS2[x].name);
                }

                for (var x = 0; x < regionSSI2.length; x++) {
                    newValue2.push(regionSSI2[x].data);
                    newCat2.push(regionSSI2[x].name);
                }

                var regionNPSLucifer = newValue.map(function(element, index, arr) {
                    return {
                        ['name']: "NPS",
                        ['data']: arr
                    }
                });

                var regionSSILucifer = newValue2.map(function(element, index, arr) {
                    return {
                        ['name']: "SSI",
                        ['data']: arr
                    }
                });

                regionalNPSLuciferPPTlabel = newCat;
                regionalNPSLuciferPPTvalue = newValue;

                regionalSSILuciferPPTlabel = newCat2;
                regionalSSILuciferPPTvalue = newValue2;

                setTimeout(() => {
                    regionalChart(regionNPSLucifer, newCat);
                    regionalChart2(regionSSILucifer, newCat2);
                }, 1000);
            }

        });
    }

    

    function twentyeightAjax(condX, timeVal, tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajax28.php",
            type: "POST",
            data: {
                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },

            success: function(response) {
                var data = JSON.parse(response);
                console.log(data);
                var piks1 = [];
                var piks2 = [];
                cat2 = [];
                val2 = [];
                data.sort((a, b) => b['value'] - a['value']);
                console.log(data);

                var cat = data.map(function(e, i, a) {
                    if (i < 14) {
                        return e.name;
                    }

                });
                var val = data.map(function(e, i, a) {
                    if (i < 14) {
                        return e.value;
                    }

                });


                for (var i = 0; i < 14; i++) {
                    cat2.push(cat[i]);
                    val2.push(val[i]);
                    piks1.push(cat[i]);
                    piks2.push(val[i]);
                }
                console.log(cat);
                console.log(val);
                setTimeout(() => {
                    customerChart(piks1, piks2)
                }, 1000);
            }

        });
    }
    
    
    function twentyeightAjaxXX(condX, timeVal, tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajax28X.php",
            type: "POST",
            data: {
                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },

            success: function(response) {
                debugger;
                var data = JSON.parse(response);
                console.log(data);
                var piks1 = [];
                var piks2 = [];
                cat2 = [];
                val2 = [];
                data.sort((a, b) => b['value'] - a['value']);
                console.log(data);

                var cat = data.map(function(e, i, a) {
                    if (i < 14) {
                        return e.name;
                    }

                });
                var val = data.map(function(e, i, a) {
                    if (i < 14) {
                        return e.value;
                    }

                });


                for (var i = 0; i < 14; i++) {
                    cat2.push(cat[i]);
                    val2.push(val[i]);
                    piks1.push(cat[i]);
                    piks2.push(val[i]);
                }
                console.log(cat);
                console.log(val);
                setTimeout(() => {
                    customerChartX(piks1, piks2)
                }, 1000);
            }

        });
    }

    function twentynineAjax(condX,timeVal,tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajax29.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },

            success: function(response) {
                var data = JSON.parse(response);
                var combineA = [];
                benchindianpsPPT = [];
                var ssiA = data['ssi'];
                var hyundaiA = data['Q5_NPS'];
                var dealerA = data['Q9_NPS'];

                combineA.push(dealerA);
                <?php if($_SESSION['user_type']==1)
                    {
                        ?>
                combineA.push(hyundaiA);
                benchindianpsPPT.push(hyundaiA);

                <?php
                    }
                    ?>

                benchindianpsPPT.push(dealerA);
                benchindianpsPPT.push(ssiA);
                console.log("hii");
                console.log(combineA);
                setTimeout(() => {
                    benchindianpsChart(combineA);
                    benchindiassiChart(ssiA);
                }, 1000);
            }

        });
    }

    function thirtyAjax(condX,timeVal,tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajax30.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },

            success: function(response) {
                var data = JSON.parse(response);
                var combineZ = [];
                benchzonenpsPPT = [];
                var ssiZ = data['ssi'];
                var hyundaiZ = data['Q5_NPS'];
                var dealerZ = data['Q9_NPS'];

                combineZ.push(dealerZ);
                <?php if($_SESSION['user_type']==1)
                    {
                        ?>
                combineZ.push(hyundaiZ);
                benchzonenpsPPT.push(hyundaiZ);

                <?php
                    }
                    ?>
                console.log(combineZ);

                benchzonenpsPPT.push(dealerZ);
                benchzonenpsPPT.push(ssiZ);
                setTimeout(() => {
                    benchzonenpsChart(combineZ);
                    benchzonessiChart(ssiZ);
                }, 1000);
            }

        });
    }

    function thirtyoneAjax(condX,timeVal,tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajax31.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },

            success: function(response) {
                var data = JSON.parse(response);
                var combineR = [];
                benchregionnpsPPT = [];
                var ssiR = data['ssi'];
                var hyundaiR = data['Q5_NPS'];
                var dealerR = data['Q9_NPS'];

                combineR.push(dealerR);
                console.log(combineR);
                <?php if($_SESSION['user_type']==1)
                    {
                        ?>
                combineR.push(hyundaiR);
                benchregionnpsPPT.push(hyundaiR);

                <?php
                    }
                    ?>

                benchregionnpsPPT.push(dealerR);
                benchregionnpsPPT.push(ssiR);
                setTimeout(() => {
                    benchregionnpsChart(combineR);
                    benchregionssiChart(ssiR);
                }, 1000);
            }

        });
    }

    function thirtytwoAjax(condX,timeVal,tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajax32.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },

            success: function(response) {
                var data = JSON.parse(response);
                var combineD = [];
                benchdealernpsPPT = [];
                var ssiD = data['ssi'];
                var hyundaiD = data['Q5_NPS'];
                var dealerD = data['Q9_NPS'];

                combineD.push(dealerD);
                console.log(combineD);
                <?php if($_SESSION['user_type']==1)
                    {
                        ?>
                combineD.push(hyundaiD);
                benchdealernpsPPT.push(hyundaiD);

                <?php
                    }
                    ?>

                benchdealernpsPPT.push(dealerD);
                benchdealernpsPPT.push(ssiD);
                setTimeout(() => {
                    benchdealernpsChart(combineD);
                    benchdealerssiChart(ssiD);
                }, 1000);
            }

        });
    }

    function thirtythreeAjax(condX,timeVal,tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajax33.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },

            success: function(response) {
                var data = JSON.parse(response);
                var combineA = [];
                benchindiafactorPPT = [];
                var f1V2 = data['digiSSI'];
                var f2V2 = data['dfSSI'];
                var f3V2 = data['scSSI'];
                var f4V2 = data['dSSI'];
                var f5V2 = data['paperSSI'];
                var f6V2 = data['deSSI'];
                combineA.push(f1V2);
                combineA.push(f2V2);
                combineA.push(f3V2);
                combineA.push(f4V2);
                combineA.push(f5V2);
                combineA.push(f6V2);

                benchindiafactorPPT.push(f1V2);
                benchindiafactorPPT.push(f2V2);
                benchindiafactorPPT.push(f3V2);
                benchindiafactorPPT.push(f4V2);
                benchindiafactorPPT.push(f5V2);
                benchindiafactorPPT.push(f6V2);
                console.log(combineA);
                setTimeout(() => {
                    benchindiafactorChart(combineA);
                }, 1000);
            }

        });
    }

    function thirtyfourAjax(condX,timeVal,tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajax34.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },

            success: function(response) {
                var data = JSON.parse(response);
                var combineZ = [];
                benchzonefactorPPT = [];
                var f1V2 = data['digiSSI'];
                var f2V2 = data['dfSSI'];
                var f3V2 = data['scSSI'];
                var f4V2 = data['dSSI'];
                var f5V2 = data['paperSSI'];
                var f6V2 = data['deSSI'];
                combineZ.push(f1V2);
                combineZ.push(f2V2);
                combineZ.push(f3V2);
                combineZ.push(f4V2);
                combineZ.push(f5V2);
                combineZ.push(f6V2);

                benchzonefactorPPT.push(f1V2);
                benchzonefactorPPT.push(f2V2);
                benchzonefactorPPT.push(f3V2);
                benchzonefactorPPT.push(f4V2);
                benchzonefactorPPT.push(f5V2);
                benchzonefactorPPT.push(f6V2);
                console.log(combineZ);
                setTimeout(() => {
                    benchzonefactorChart(combineZ);
                }, 1000);
            }

        });
    }

    function thirtyfiveAjax(condX,timeVal,tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajax35.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },

            success: function(response) {
                var data = JSON.parse(response);
                var combineR = [];
                benchregionfactorPPT = [];
                var f1V2 = data['digiSSI'];
                var f2V2 = data['dfSSI'];
                var f3V2 = data['scSSI'];
                var f4V2 = data['dSSI'];
                var f5V2 = data['paperSSI'];
                var f6V2 = data['deSSI'];
                combineR.push(f1V2);
                combineR.push(f2V2);
                combineR.push(f3V2);
                combineR.push(f4V2);
                combineR.push(f5V2);
                combineR.push(f6V2);

                benchregionfactorPPT.push(f1V2);
                benchregionfactorPPT.push(f2V2);
                benchregionfactorPPT.push(f3V2);
                benchregionfactorPPT.push(f4V2);
                benchregionfactorPPT.push(f5V2);
                benchregionfactorPPT.push(f6V2);
                console.log(combineR);
                setTimeout(() => {
                    benchregionfactorChart(combineR);
                }, 1000);
            }

        });
    }

    function thirtysixAjax(condX,timeVal,tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajax36.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },

            success: function(response) {
                var data = JSON.parse(response);
                console.log("hii123");
                console.log(data);
                var combineD = [];
                benchdealerfactorPPT = [];
                var f1V2 = data['digiSSI'];
                var f2V2 = data['dfSSI'];
                var f3V2 = data['scSSI'];
                var f4V2 = data['dSSI'];
                var f5V2 = data['paperSSI'];
                var f6V2 = data['deSSI'];
                combineD.push(f1V2);
                combineD.push(f2V2);
                combineD.push(f3V2);
                combineD.push(f4V2);
                combineD.push(f5V2);
                combineD.push(f6V2);

                benchdealerfactorPPT.push(f1V2);
                benchdealerfactorPPT.push(f2V2);
                benchdealerfactorPPT.push(f3V2);
                benchdealerfactorPPT.push(f4V2);
                benchdealerfactorPPT.push(f5V2);
                benchdealerfactorPPT.push(f6V2);
                console.log(combineD);
                setTimeout(() => {
                    benchdealerfactorChart(combineD);
                }, 1000);
            }

        });
    }

    function thirtysevenAjax(condX, timeVal,tablecondX) {
        debugger;
        //console.log(conX)
        $.ajax({
            url: "api/ajax37.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },

            success: function(response) {
                debugger;
                var dataA = JSON.parse(response);
                var dataB = JSON.parse(response);
                console.log("37");
                console.log(data);
                console.log(data2);
                var data = Object.values(dataA);
                var data2 = Object.values(dataB);
                console.log(data);
                console.log(data2);
                data.sort((a, b) => b['nps'] - a['nps']);
                console.log("37sort");
                console.log(data);
                console.log("37_2");
                
                console.log(data[0]['name']);
                console.log(data[0]['score']);
                var arr2 = data.map(function(e, i, a) {
                    return e.nps;
                });

                var ranks = arr2.map(function(v) {
                    return arr2.indexOf(v) + 1
                });
                var tbl = ``;
                tbl +=
                    `<table id="topd" class="table table-striped table-bordered no-footer text-center display" style="font-size:12px">`;
                tbl += `<thead style="background-color:#002a5c;color:#fff;width:100%">`;

                tbl += `<tr>`;

                tbl += `<th style="width:50px">Ranks</th>`;
                tbl += `<th style="width:150px">Dealer Name</th>`;
                tbl += `<th style="width:150px">Dealer Code</th>`;
                tbl += `<th style="width:150px">Dealer SSI</th>`;
                tbl += `<th style="width:150px">NPS</th>`;
                <?php if($_SESSION['user_type']==1){
                ?>
                tbl += `<th style="width:150px">Hyundai NPS</th>`;
                <?php
                }
                ?>
                tbl += `</tr>`;
                tbl += `</thead>`;
                tbl += `<tbody>`;

                for (var i = 0; i < data.length; i++) {

                    tbl += `<tr>`;

                    tbl += `<td>`;
                    tbl += `${ranks[i]}`;
                    tbl += `</td>`;
                    tbl += `<td>`;
                    tbl += `${data[i]['nameX']}`;
                    tbl += `</td>`;
                    tbl += `<td>`;
                    tbl += `${data[i]['codeX']}`;
                    tbl += `</td>`;
                    tbl += `<td>`;
                    tbl += `${data[i]['score']}`;
                    tbl += `</td>`;
                    tbl += `<td>`;
                    tbl += `${data[i]['nps']}%`;
                    tbl += `</td>`;
                    <?php if($_SESSION['user_type']==1){
                ?>
                    tbl += `<td>`;
                    tbl += `${data[i]['nps2']}%`;
                    tbl += `</td>`;
                    <?php
                    }
                    ?>
                    tbl += `</tr>`;
                }
                tbl += `</tbody>`;
                tbl += `</table>`;

                $("#50T").empty().append(tbl);
                
                
                console.log(data2);
                data2.sort((a, b) => b['score'] - a['score']);
                
                var arr9 = data2.map(function(e, i, a) {
                    return e.score;
                });

                var ranks9 = arr9.map(function(v) {
                    return arr9.indexOf(v) + 1
                });
                
                var tbl9 = ``;
                tbl9 +=
                    `<table id="topd2" class="table table-striped table-bordered no-footer text-center display" style="font-size:12px">`;
                tbl9 += `<thead style="background-color:#002a5c;color:#fff;width:100%">`;

                tbl9 += `<tr>`;

                tbl9 += `<th style="width:50px">Ranks</th>`;
                tbl9 += `<th style="width:150px">Dealer Name</th>`;
                tbl9 += `<th style="width:150px">Dealer Code</th>`;
                tbl9 += `<th style="width:150px">Dealer SSI</th>`;
                tbl9 += `<th style="width:150px">NPS</th>`;
                <?php if($_SESSION['user_type']==1){
                ?>
                tbl9 += `<th style="width:150px">Hyundai NPS</th>`;
                <?php
                }
                ?>
                tbl9 += `</tr>`;
                tbl9 += `</thead>`;
                tbl9 += `<tbody>`;

                for (var i = 0; i < data2.length; i++) {

                    tbl9 += `<tr>`;

                    tbl9 += `<td>`;
                    tbl9 += `${ranks9[i]}`;
                    tbl9 += `</td>`;
                    tbl9 += `<td>`;
                    tbl9 += `${data2[i]['nameX']}`;
                    tbl9 += `</td>`;
                    tbl9 += `<td>`;
                    tbl9 += `${data2[i]['codeX']}`;
                    tbl9 += `</td>`;
                    tbl9 += `<td>`;
                    tbl9 += `${data2[i]['score']}`;
                    tbl9 += `</td>`;
                    tbl9 += `<td>`;
                    tbl9 += `${data2[i]['nps']}%`;
                    tbl9 += `</td>`;
                    <?php if($_SESSION['user_type']==1){
                ?>
                    tbl9 += `<td>`;
                    tbl9 += `${data2[i]['nps2']}%`;
                    tbl9 += `</td>`;
                    <?php
                    }
                    ?>
                    tbl9 += `</tr>`;
                }
                tbl9 += `</tbody>`;
                tbl9 += `</table>`;

                $("#100T").empty().append(tbl9);
                
                setTimeout(() => {
                    $('#topd').DataTable({
                        searching: false,
                        paging: false,
                        info: false,
                        "scrollY": "390px",
                        "scrollCollapse": false,

                    });
                    
                    $('#topd2').DataTable({
                        searching: false,
                        paging: false,
                        info: false,
                        "scrollY": "390px",
                        "scrollCollapse": false,

                    });
                }, 1000);
            }

        });
    }

    function thirtyeightAjax(condX,timeVal,tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajax38.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },

            success: function(response) {
                var data = JSON.parse(response);
                benchsubdealernpsPPT = [];
                var combineD = [];
                var ssiD = data['ssi'];
                var hyundaiD = data['Q5_NPS'];
                var dealerD = data['Q9_NPS'];

                combineD.push(dealerD);
                console.log(combineD);

                benchsubdealernpsPPT.push(dealerD);
                benchsubdealernpsPPT.push(ssiD);
                <?php if($_SESSION['user_type']==1)
                    {
                        ?>
                combineD.push(hyundaiD);
                benchsubdealernpsPPT.push(hyundaiD);

                <?php
                    }
                    ?>
                setTimeout(() => {
                    benchsubdealernpsChart(combineD);
                    benchsubdealerssiChart(ssiD);
                }, 1000);
            }

        });
    }

    function thirtynineAjax(condX,timeVal,tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajax39.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },

            success: function(response) {
                var data = JSON.parse(response);
                var combineD = [];
                benchsubdealerfactorPPT = [];
                var f1V2 = data['digiSSI'];
                var f2V2 = data['dfSSI'];
                var f3V2 = data['scSSI'];
                var f4V2 = data['dSSI'];
                var f5V2 = data['paperSSI'];
                var f6V2 = data['deSSI'];
                combineD.push(f1V2);
                combineD.push(f2V2);
                combineD.push(f3V2);
                combineD.push(f4V2);
                combineD.push(f5V2);
                combineD.push(f6V2);

                benchsubdealerfactorPPT.push(f1V2);
                benchsubdealerfactorPPT.push(f2V2);
                benchsubdealerfactorPPT.push(f3V2);
                benchsubdealerfactorPPT.push(f4V2);
                benchsubdealerfactorPPT.push(f5V2);
                benchsubdealerfactorPPT.push(f6V2);
                console.log(combineD);
                setTimeout(() => {
                    benchsubdealerfactorChart(combineD);
                }, 1000);
            }

        });
    }

    function fortyAjax(condX,timeVal,tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajax40.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },

            success: function(response) {
                var data = JSON.parse(response);
                var combineD = [];
                benchstatenpsPPT = [];
                var ssiD = data['ssi'];
                var hyundaiD = data['Q5_NPS'];
                var dealerD = data['Q9_NPS'];
                combineD.push(hyundaiD);
                combineD.push(dealerD);
                console.log(combineD);

                benchstatenpsPPT.push(hyundaiD);
                benchstatenpsPPT.push(dealerD);
                benchstatenpsPPT.push(ssiD);
                setTimeout(() => {
                    benchstatenpsChart(combineD);
                    benchstatessiChart(ssiD);
                }, 1000);
            }

        });
    }

    function fortyoneAjax(condX,timeVal,tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajax41.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },

            success: function(response) {
                var data = JSON.parse(response);
                var combineD = [];
                benchstatefactorPPT = [];
                var f1V2 = data['digiSSI'];
                var f2V2 = data['dfSSI'];
                var f3V2 = data['scSSI'];
                var f4V2 = data['dSSI'];
                var f5V2 = data['paperSSI'];
                var f6V2 = data['deSSI'];
                combineD.push(f1V2);
                combineD.push(f2V2);
                combineD.push(f3V2);
                combineD.push(f4V2);
                combineD.push(f5V2);
                combineD.push(f6V2);

                benchstatefactorPPT.push(f1V2);
                benchstatefactorPPT.push(f2V2);
                benchstatefactorPPT.push(f3V2);
                benchstatefactorPPT.push(f4V2);
                benchstatefactorPPT.push(f5V2);
                benchstatefactorPPT.push(f6V2);
                console.log(combineD);
                setTimeout(() => {
                    benchstatefactorChart(combineD);

                }, 1000);
            }

        });
    }

    function fortythreeAjax(condX,timeVal,tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajax43.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },

            success: function(response) {
                var data = JSON.parse(response);
                var combineD = [];
                benchcitynpsPPT = [];
                var ssiD = data['ssi'];
                var hyundaiD = data['Q5_NPS'];
                var dealerD = data['Q9_NPS'];
                combineD.push(hyundaiD);
                combineD.push(dealerD);
                console.log(combineD);
                benchcitynpsPPT.push(hyundaiD);
                benchcitynpsPPT.push(dealerD);
                benchcitynpsPPT.push(ssiD);
                setTimeout(() => {
                    benchcitynpsChart(combineD);
                    benchcityssiChart(ssiD);
                }, 1000);
            }

        });
    }

    function fortyfourAjax(condX,timeVal,tablecondX) {
        //console.log(conX)
        $.ajax({
            url: "api/ajax44.php",
            type: "POST",
            data: {

                'condX': condX,
                'conX': conX,
                'timeX': timeVal,
                'tablecondX': tablecondX
            },

            success: function(response) {
                var data = JSON.parse(response);
                var combineD = [];
                benchcityfactorPPT = [];
                var f1V2 = data['digiSSI'];
                var f2V2 = data['dfSSI'];
                var f3V2 = data['scSSI'];
                var f4V2 = data['dSSI'];
                var f5V2 = data['paperSSI'];
                var f6V2 = data['deSSI'];
                combineD.push(f1V2);
                combineD.push(f2V2);
                combineD.push(f3V2);
                combineD.push(f4V2);
                combineD.push(f5V2);
                combineD.push(f6V2);

                benchcityfactorPPT.push(f1V2);
                benchcityfactorPPT.push(f2V2);
                benchcityfactorPPT.push(f3V2);
                benchcityfactorPPT.push(f4V2);
                benchcityfactorPPT.push(f5V2);
                benchcityfactorPPT.push(f6V2);
                console.log(benchcityfactorPPT);
                console.log(combineD);
                setTimeout(() => {
                    benchcityfactorChart(combineD);

                }, 1000);
            }

        });
    }
    function fortytwoAjax(datafortable, datafortable2) {
        //debugger;

        var data = datafortable;
        var data2 = datafortable2;
        console.log(data);
        console.log(data2);
        
        var ribbon_txt = ["Dealer NPS","Hyundai NPS","SSI Performance Index","Dealer Preference","Hyundai Preference (top 2box%)","Digitization","Dealer Facility","Sales Consultant","Deal","Paperwork","Delivery","% visited Hyundai India website before making final purchase","Digitization(Factor Score)","Design and Appearance(%satisfied)","Design and Appearance(% Dissatisfied)","Completeness of Vehicle Information & Dealership’s Contact Information(% satisfied)","Completeness of Vehicle Information & Dealership’s Contact Information(% Dissatisfied)","Ease of Viewing and Navigation(% satisfied)","Ease of Viewing and Navigation(% Dissatisfied)","% informed about availability of CTB","% opted for CTB option for car booking","% opted for online finance via CTB website","Experience on CTB Website While Booking The Car(% satisfied)","Experience on CTB Website While Booking The Car(% Dissatisfied)","Experience on CTB Website On Financing & Generating Quotes(% satisfied)","Experience on CTB Website On Financing & Generating Quotes(% Dissatisfied)","Facility(Factor Score)","Overall % count respondents coded 1-8 in experience of Facility/ Infrastructure","Parking Space","Showroom Cleanliness","Quality of amenities","Sales Consultant(Factor Score)","Shared brochure/price list etc with the customer (Diagnostics(Sales Consultant))","Informed about monthly consumer schemesr (Diagnostics(Sales Consultant))","Explained benefits of buying VAS (Diagnostics(Sales Consultant))","Gave comprehensive explanation of car features/benefits of Vehicle (Diagnostics(Sales Consultant))","Explained about Hyundai’s edge over its competition (Diagnostics(Sales Consultant))","Asked respondent to sit on driver's seat while giving demo (Diagnostics(Sales Consultant))","Overall % count respondents coded 1-8 in experience of Sales Consultant","Did not met within reasonable time on customer arrival at dealership (Diagnostics- Weak Areas(Sales Consultant))","Did not used any digital devices to introduce customer to the vehicle (Diagnostics- Weak Areas(Sales Consultant))","Did not ask question to determine model, features and options important to customer (Diagnostics- Weak Areas(Sales Consultant))","% Offered test drive at the dealership","% took test drive at the dealership from where vehicle was purchased","Test Drive Experience(% satisfied)","Test Drive Experience(% Dissatisfied)","Test drive at another dealership(Reason for Not Taking Test Drive)","Didn't want/need test drive(Reason for Not Taking Test Drive)","Test drive vehicle was unavailable(Reason for Not Taking Test Drive)","Deal(Factor Score)","Overall % count respondents coded 1-8 in experience of Deal Diagnostics","% respondent say they got a difficulty in getting Cost of Vehicle(Diagnostic)","% respondent say that Sales Consultant changed the promised price later(Diagnostic)","% respondents say that Sales Consultant informed them about price rise during negotiation stage(Diagnostic)","% respondents say Sales Consultant pressurred them for vehicle sale(Diagnostics)","Paperwork(Factor Score)","Overall % count respondents coded 1-8 in experience of Paperwork","More than My Expectations(Time Taken to Complete paperwork)","Same as My Expectations(Time Taken to Complete paperwork)","Less than My Expectations(Time Taken to Complete paperwork)","More than My Expectations(Paperwork Process Explanation)","Same as My Expectations(Paperwork Process Explanation)","Less than My Expectations(Paperwork Process Explanation)","% respondent say that sales consultant Pressurize for Purchase of additional Products(Diagnostics)","% respondent say that staff at dealership did addition in Non agreed products(Diagnostics)","% respondent say that they have to Follow-up/Return at dealership for Paperwork Problem(Diagnostics)","Delivery(Factor Score)","Overall % count respondents coded 1-8 in experience of delivery of new vehicle","Vehicle was delivered with no issues(Condition Of Vehicle During delivery)","Vehicle was not clean(Condition Of Vehicle During delivery)","Vehicle was not fitted(Condition Of Vehicle During delivery)","Vehicle had dents/scratches(Condition Of Vehicle During delivery)","Explained in Detail(Quality of Vehicle Operating Control During Delivery)","Explained Somewhat(Quality of Vehicle Operating Control During Delivery)","Poor Explanation(Quality of Vehicle Operating Control During Delivery)","TIme taken was faster than what i expected(Time Taken In Delivery Process)","Time taken was same as what i expected(Time Taken In Delivery Process)","Took longer than i expected(Time Taken In Delivery Process)","Attributes(Service Department)","% respondent say dealership Agree for Home Delivery of vehicle when requested(Diagnostics)","% respondent say sales consultant Informed them of Delivery Status(Diagnostics)","% respondent say vehicle was delivered with all Promised Feature(Diagnostics)","% respondent say that the vehicle was delivery with a Ceremony(Diagnostics)","% respondents follow-up call after Deliver(Diagnostics)","Host","Empathy","Anticipate","Respect","Thanks"];
        var ribbon_txt2 = ["Hyundai NPS","Hyundai Preference (top 2box%)"];
        var red_arr = ["FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","00B050","FF9900","00B050","FF9900","00B050","FF9900","FF9900","FF9900","FF9900","00B050","FF9900","00B050","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","00B050","00B050","00B050","FF9900","FF9900","FF9900","00B050","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900","FF9900"];
        var green_arr = ["00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","FF9900","00B050","FF9900","00B050","FF9900","00B050","00B050","00B050","00B050","FF9900","00B050","FF9900","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","FF9900","FF9900","FF9900","00B050","00B050","00B050","FF9900","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050","00B050"];   
        
        var tbl = ``;
        var tbl2 = ``;
        var tbl3 = ``;
        var tbl4 = ``;

        var cityVal = $('#city option:selected').map(function(i, v) {
            return this.value;
        }).get();
        var stateVal = $('#state option:selected').map(function(i, v) {
            return this.value;
        }).get();
        var zoneVal = $('#zone option:selected').map(function(i, v) {
            return this.value;
        }).get();
        var regionVal = $('#region option:selected').map(function(i, v) {
            return this.value;
        }).get();
        var maindealerVal = $('#maindealer').val();

        var dealerVal = $('#dealer').val();

        var timeVal = $('#time option:selected').map(function(i, v) {
            timeText.push($(this).attr("data-name"));
            return this.value;

        }).get();

        console.log(timeVal);


        var cityValX = cityVal.map(function(value) {
            return `${value}`;
        }).join(',');
        var stateValX = stateVal.map(function(value) {
            return `${value}`;
        }).join(',');
        var zoneValX = zoneVal.map(function(value) {
            return `${value}`;
        }).join(',');
        var regionValX = regionVal.map(function(value) {
            return `${value}`;
        }).join(',');

        var zoneLengthY = $("#zone option:selected").length;
        var cityLengthY = $("#city option:selected").length;
        var stateLengthY = $("#state option:selected").length;
        var zoneLengthY = $("#zone option:selected").length;
        var regionLengthY = $("#region option:selected").length;
        var maindealerVal = $('#maindealer').val();
        var dealerVal = $('#dealer').val();
        var commentArr = [];
        var commentArr2 = [];
        var commentcondX = ``;
        //debugger;
        //if (zoneLengthY <= 1) {
            commentcondX += `Zone = '${zoneValX}'`;
        // }
        // if (regionLengthY <= 1) {
            commentcondX += `AND Region = '${regionValX}' `;
        // }
        // if (maindealerVal >= "0") {
            if (maindealerVal == "0") {
                maindealerVal = '';
            }
            commentcondX += `AND Main_dealer_name = '${maindealerVal}'`;
        // }
        // if (dealerVal >= "0") {
            if (dealerVal == "0") {
                dealerVal = '';
            }
            commentcondX += ` AND Dealer_name = '${dealerVal}'`;
        // }
        // if (stateLengthY <= 1) {
            commentcondX += `AND State = '${stateValX}'`;
        // }
        // if (cityLengthY <= 1) {
            commentcondX += `AND City = '${cityValX}'`;
        //}
        //////debugger;
        if (data.length == 0) {
            data = datafortable2;
            var ribbon_val = [data[0]['Q9_NPS'],data[0]['Q5_NPS'],data[0]['ssi'],data[0]['Q8'],data[0]['Q4'],data[2]['digiSSI'],data[2]['dfSSI'],data[2]['scSSI'],data[2]['dSSI'],data[2]['paperSSI'],data[2]['deSSI'],data[1]['Q11'],data[2]['digiSSI'],data[1]['Q12O'],data[1]['Q12p'],data[1]['Q14O'],data[1]['Q14p'],data[1]['Q13O'],data[1]['Q13p'],data[1]['Q15'],data[1]['Q15a'],data[1]['Q15c'],data[1]['Q15bO'],data[1]['Q15bp'],data[1]['Q15dO'],data[1]['Q15dp'],data[2]['dfSSI'],data[3]['Q17'],data[3]['Q18a'],data[3]['Q18c'],data[3]['Q18d'],data[2]['scSSI'],data[4]['Q19a1'],data[4]['Q19a2'],data[4]['Q19a3'],data[4]['Q19e'],data[4]['Q19e3'],data[4]['Q19f'],data[4]['Q19'],data[4]['Q19a'],data[4]['Q19b'],data[4]['Q19d'],data[5]['Q20'],data[5]['Q21'],data[5]['Q22O'],data[5]['Q22p'],data[5]['Q23'][0],data[5]['Q23'][1],data[5]['Q23'][2],data[2]['dSSI'],data[6]['Q24'],data[6]['Q25'][0],data[6]['Q25'][1],data[6]['Q25'][2],data[6]['Q25'][3],data[2]['paperSSI'],data[7]['Q26N'],data[7]['Q26a'][0],data[7]['Q26a'][1],data[7]['Q26a'][2],data[7]['Q26b'][0],data[7]['Q26b'][1],data[7]['Q26b'][2],data[7]['Q26'][0],data[7]['Q26'][1],data[7]['Q26'][2],data[2]['deSSI'],data[8]['Q27'],data[8]['Q28a'][0],data[8]['Q28a'][1],data[8]['Q28a'][2],data[8]['Q28a'][3],data[8]['Q28b'][0],data[8]['Q28b'][1],data[8]['Q28b'][2],data[8]['Q28e'][0],data[8]['Q28e'][1],data[8]['Q28e'][2],data[8]['Q28d'],data[8]['delivery_attr'][0],data[8]['delivery_attr'][1],data[8]['delivery_attr'][2],data[8]['delivery_attr'][3],data[8]['delivery_attr'][4],data[9]['host'],data[9]['empathy'],data[9]['anticipate'],data[9]['respect'],data[9]['thanks']];
        }
        else
        {
            var ribbon_val = [data[0]['Q9_NPS'],data[0]['Q5_NPS'],data[0]['ssi'],data[0]['Q8'],data[0]['Q4'],data[2]['digiSSI'],data[2]['dfSSI'],data[2]['scSSI'],data[2]['dSSI'],data[2]['paperSSI'],data[2]['deSSI'],data[1]['Q11'],data[2]['digiSSI'],data[1]['Q12O'],data[1]['Q12p'],data[1]['Q14O'],data[1]['Q14p'],data[1]['Q13O'],data[1]['Q13p'],data[1]['Q15'],data[1]['Q15a'],data[1]['Q15c'],data[1]['Q15bO'],data[1]['Q15bp'],data[1]['Q15dO'],data[1]['Q15dp'],data[2]['dfSSI'],data[3]['Q17'],data[3]['Q18a'],data[3]['Q18c'],data[3]['Q18d'],data[2]['scSSI'],data[4]['Q19a1'],data[4]['Q19a2'],data[4]['Q19a3'],data[4]['Q19e'],data[4]['Q19e3'],data[4]['Q19f'],data[4]['Q19'],data[4]['Q19a'],data[4]['Q19b'],data[4]['Q19d'],data[5]['Q20'],data[5]['Q21'],data[5]['Q22O'],data[5]['Q22p'],data[5]['Q23'][0],data[5]['Q23'][1],data[5]['Q23'][2],data[2]['dSSI'],data[6]['Q24'],data[6]['Q25'][0],data[6]['Q25'][1],data[6]['Q25'][2],data[6]['Q25'][3],data[2]['paperSSI'],data[7]['Q26N'],data[7]['Q26a'][0],data[7]['Q26a'][1],data[7]['Q26a'][2],data[7]['Q26b'][0],data[7]['Q26b'][1],data[7]['Q26b'][2],data[7]['Q26'][0],data[7]['Q26'][1],data[7]['Q26'][2],data[2]['deSSI'],data[8]['Q27'],data[8]['Q28a'][0],data[8]['Q28a'][1],data[8]['Q28a'][2],data[8]['Q28a'][3],data[8]['Q28b'][0],data[8]['Q28b'][1],data[8]['Q28b'][2],data[8]['Q28e'][0],data[8]['Q28e'][1],data[8]['Q28e'][2],data[8]['Q28d'],data[8]['delivery_attr'][0],data[8]['delivery_attr'][1],data[8]['delivery_attr'][2],data[8]['delivery_attr'][3],data[8]['delivery_attr'][4],data[9]['host'],data[9]['empathy'],data[9]['anticipate'],data[9]['respect'],data[9]['thanks']];
        }
        if (data2.length != 0) {
            var ribbon_val2 = [data2[0]['Q9_NPS'],data2[0]['Q5_NPS'],data2[0]['ssi'],data2[0]['Q8'],data2[0]['Q4'],data2[2]['digiSSI'],data2[2]['dfSSI'],data2[2]['scSSI'],data2[2]['dSSI'],data2[2]['paperSSI'],data2[2]['deSSI'],data2[1]['Q11'],data2[2]['digiSSI'],data2[1]['Q12O'],data2[1]['Q12p'],data2[1]['Q14O'],data2[1]['Q14p'],data2[1]['Q13O'],data2[1]['Q13p'],data2[1]['Q15'],data2[1]['Q15a'],data2[1]['Q15c'],data2[1]['Q15bO'],data2[1]['Q15bp'],data2[1]['Q15dO'],data2[1]['Q15dp'],data2[2]['dfSSI'],data2[3]['Q17'],data2[3]['Q18a'],data2[3]['Q18c'],data2[3]['Q18d'],data2[2]['scSSI'],data2[4]['Q19a1'],data2[4]['Q19a2'],data2[4]['Q19a3'],data2[4]['Q19e'],data2[4]['Q19e3'],data2[4]['Q19f'],data2[4]['Q19'],data2[4]['Q19a'],data2[4]['Q19b'],data2[4]['Q19d'],data2[5]['Q20'],data2[5]['Q21'],data2[5]['Q22O'],data2[5]['Q22p'],data2[5]['Q23'][0],data2[5]['Q23'][1],data2[5]['Q23'][2],data2[2]['dSSI'],data2[6]['Q24'],data2[6]['Q25'][0],data2[6]['Q25'][1],data2[6]['Q25'][2],data2[6]['Q25'][3],data2[2]['paperSSI'],data2[7]['Q26N'],data2[7]['Q26a'][0],data2[7]['Q26a'][1],data2[7]['Q26a'][2],data2[7]['Q26b'][0],data2[7]['Q26b'][1],data2[7]['Q26b'][2],data2[7]['Q26'][0],data2[7]['Q26'][1],data2[7]['Q26'][2],data2[2]['deSSI'],data2[8]['Q27'],data2[8]['Q28a'][0],data2[8]['Q28a'][1],data2[8]['Q28a'][2],data2[8]['Q28a'][3],data2[8]['Q28b'][0],data2[8]['Q28b'][1],data2[8]['Q28b'][2],data2[8]['Q28e'][0],data2[8]['Q28e'][1],data2[8]['Q28e'][2],data2[8]['Q28d'],data2[8]['delivery_attr'][0],data2[8]['delivery_attr'][1],data2[8]['delivery_attr'][2],data2[8]['delivery_attr'][3],data2[8]['delivery_attr'][4],data2[9]['host'],data2[9]['empathy'],data2[9]['anticipate'],data2[9]['respect'],data2[9]['thanks']];
        }
        
        if (conX == 1) {
            //overall performance tab start
            $("#first_row").hide();
            $("#first_row2").hide();
            $("#first_row3").hide();
            $("#first_row4").hide();
            for(var i = 0; i<ribbon_txt.length;i++)
            {
                tbl += `<tr>`;
                tbl += `<td style="display:none">`;
                tbl += `${[i+1]}`;
                tbl += `</td>`;
                tbl += `<td>`;
                tbl += `${ribbon_txt[i]}`;
                tbl += `</td>`;
                tbl += `<td>`;
                tbl += ribbon_val[i];
                tbl += `</td>`;
                tbl += `<td>`;
                tbl += `-`;
                tbl += `</td>`;
                
                tbl3 += `<tr>`;
                tbl3 += `<td style="display:none">`;
                tbl3 += `${[i+1]}`;
                tbl3 += `</td>`;
                tbl3 += `<td>`;
                tbl3 += `${ribbon_txt[i]}`;
                tbl3 += `</td>`;
                tbl3 += `<td>`;
                tbl3 += ribbon_val[i];
                tbl3 += `</td>`;
                tbl3 += `<td>`;
                tbl3 += `-`;
                tbl3 += `</td>`;
                if (commentArr.length != 0) {
                    tbl += `<td>`;
                    tbl += `${commentArr[0]}`;
                    tbl += `</td>`;
                } else {
                    tbl += `<td>`;
                    tbl += ``;
                    tbl += `</td>`;
                }
                tbl += `</tr>`;
                tbl3 += `</tr>`;

                tbl2 += `<tr>`;
                tbl2 += `<td style="display:none">`;
                tbl2 += `${[i+1]}`;
                tbl2 += `</td>`;
                tbl2 += `<td>`;
                tbl2 += `${ribbon_txt[i]}`;
                tbl2 += `</td>`;
                tbl2 += `<td>`;
                tbl2 += ribbon_val[i];
                tbl2 += `</td>`;
                tbl2 += `<td>`;
                tbl2 += `-`;
                tbl2 += `</td>`;
                if (commentArr.length != 0) {
                    tbl2 += `<td>`;
                    tbl2 += `${commentArr[0]}`;
                    tbl2 += `</td>`;
                } else {
                    tbl2 += `<td>`;
                    tbl2 += ``;
                    tbl2 += `</td>`;
                }
                tbl2 += `</tr>`;
            }

            $("#allT > tbody").empty().append(tbl);
            $("#allT2 > tbody").empty().append(tbl2);
            $("#tblOver > tbody").empty().append(tbl3);
            $("#tblKey > tbody").empty().append(tbl2);
        }
        if (conX == 2) {
            //overall performance tab start
            $("#first_row").hide();
            $("#first_row2").hide();
            $("#first_row3").hide();
            $("#first_row4").hide();
            $.ajax({
                url: "api/comment.php",
                type: "POST",
                data: {
                    'condX': commentcondX,
                    'timeVal': timeVal,
                },
                success: function(response) {
                    var data16 = JSON.parse(response);
                    console.log(data16);
                    var comment1 = data16['comment1'];
                    var comment2 = data16['comment2'];
                    var key2 = data16['key2'];
                    var key = data16['key'];
                    console.log(comment1);
                    console.log(comment2);
                    console.log(key);
                    if(comment1.length==1)
                    {
                        commentArr = [];
                    }
                    else
                    {
                        commentArr = comment1;
                    }
                    if(comment2.length==1)
                    {
                        commentArr2 = [];
                    }
                    else
                    {
                        commentArr2 = comment2;
                    }
                    console.log(commentArr);
                    console.log(commentArr2);
                    
                    for(var i = 0; i<ribbon_txt.length;i++)
                    {
                        if(commentArr2.length!=0)
                        {
                            var nm=i+1;
                            nm= nm.toString();
                            var j=key.indexOf(nm)
                            if(j>=0)
                            {
                                comment2 = commentArr2[j];
                            }
                            else{
                                comment2 = '';
                            }
                        }
                        if(commentArr.length!=0)
                        {
                            var nm2=i+1;
                            nm2= nm2.toString();
                            var j2=key2.indexOf(nm2)
                            if(j2>=0)
                            {
                                comment1 = commentArr[j2];
                            }
                            else{
                                comment1 = '';
                            }
                        }

                        var userTypeX = <?php echo $_SESSION['user_type']; ?>;
                        var varX = 1;
                        if((userTypeX!=1) && (ribbon_txt[i]=="Hyundai NPS" || ribbon_txt[i]=="Hyundai Preference (top 2box%)"))
                        {
                            varX = 0;
                        }
                        if(varX==1)
                        {
                            tbl += `<tr>`;
                            tbl += `<td style="display:none">`;
                            tbl += `${[i+1]}`;
                            tbl += `</td>`;
                            tbl += `<td>`;
                            tbl += `${ribbon_txt[i]}`;
                            tbl += `</td>`;
                            tbl += `<td>`;
                            tbl += ribbon_val[i];
                            tbl += `</td>`;
                            
                            tbl3 += `<tr>`;
                            tbl3 += `<td style="display:none">`;
                            tbl3 += `${[i+1]}`;
                            tbl3 += `</td>`;
                            tbl3 += `<td>`;
                            tbl3 += `${ribbon_txt[i]}`;
                            tbl3 += `</td>`;
                            tbl3 += `<td>`;
                            tbl3 += ribbon_val2[i];
                            tbl3 += `</td>`;
                            if(ribbon_val[i] > ribbon_val2[i])
                            {
                                tbl += `<td style="color:#${red_arr[i]}" data-f-color="${red_arr[i]}">`;
                                tbl += ribbon_val2[i];
                                tbl += `</td>`;
                            }
                            else
                            {
                                tbl += `<td style="color:#${green_arr[i]}" data-f-color="${green_arr[i]}">`;
                                tbl += ribbon_val2[i];
                                tbl += `</td>`;
                            }
                            tbl += `<td>`;
                            tbl += `${comment1}`;
                            tbl += `</td>`;
                            if (zoneLengthY <= 1) {
                                tbl += `<td style="display:none">`;
                                tbl += `${zoneValX}`;
                                tbl += `</td>`;
                            } else {
                                tbl += `<td style="display:none">`;
                                tbl += ``;
                                tbl += `</td>`;
                            }
                            if (regionLengthY <= 1) {
                                tbl += `<td style="display:none">`;
                                tbl += `${regionValX}`;
                                tbl += `</td>`;
                            } else {
                                tbl += `<td style="display:none">`;
                                tbl += ``;
                                tbl += `</td>`;
                            }
                            if (maindealerVal != 0) {
                                tbl += `<td style="display:none">`;
                                tbl += `${maindealerVal}`;
                                tbl += `</td>`;
                            } else {
                                tbl += `<td style="display:none">`;
                                tbl += ``;
                                tbl += `</td>`;
                            }
                            if (dealerVal != 0) {
                                tbl += `<td style="display:none">`;
                                tbl += `${dealerVal}`;
                                tbl += `</td>`;
                            } else {
                                tbl += `<td style="display:none">`;
                                tbl += ``;
                                tbl += `</td>`;
                            }
                            if (stateLengthY <= 1) {
                                tbl += `<td style="display:none">`;
                                tbl += `${stateValX}`;
                                tbl += `</td>`;
                            } else {
                                tbl += `<td style="display:none">`;
                                tbl += ``;
                                tbl += `</td>`;
                            }
                            if (cityLengthY <= 1) {
                                tbl += `<td style="display:none">`;
                                tbl += `${cityValX}`;
                                tbl += `</td>`;
                            } else {
                                tbl += `<td style="display:none">`;
                                tbl += ``;
                                tbl += `</td>`;
                            }
                            if (timeVal.length <= 1) {
                                tbl += `<td style="display:none">`;
                                tbl += `${timeVal[0]}`;
                                tbl += `</td>`;
                            } else {
                                tbl += `<td style="display:none">`;
                                tbl += ``;
                                tbl += `</td>`;
                            }
                            tbl += `</tr>`;
                            tbl3 += `</tr>`;
                            
                            //debugger;

                            if(ribbon_val[i] > ribbon_val2[i])
                            {
                                if(red_arr[i]=="FF9900")
                                {
                                    
                                        tbl2 += `<tr>`;
                                        tbl2 += `<td style="display:none">`;
                                        tbl2 += `${[i+1]}`;
                                        tbl2 += `</td>`;
                                        tbl2 += `<td>`;
                                        tbl2 += `${ribbon_txt[i]}`;
                                        tbl2 += `</td>`;
                                        tbl2 += `<td>`;
                                        tbl2 += ribbon_val[i];
                                        tbl2 += `</td>`;
                                        tbl2 += `<td style="color:#${red_arr[i]}" data-f-color="${red_arr[i]}">`;
                                        tbl2 += ribbon_val2[i];
                                        tbl2 += `</td>`;
                                        tbl2 += `<td>`;
                                        tbl2 += `${comment2}`;
                                        tbl2 += `</td>`;
                                        if (zoneLengthY <= 1) {
                                            tbl2 += `<td style="display:none">`;
                                            tbl2 += `${zoneValX}`;
                                            tbl2 += `</td>`;
                                        } else {
                                            tbl2 += `<td style="display:none">`;
                                            tbl2 += ``;
                                            tbl2 += `</td>`;
                                        }
                                        if (regionLengthY <= 1) {
                                            tbl2 += `<td style="display:none">`;
                                            tbl2 += `${regionValX}`;
                                            tbl2 += `</td>`;
                                        } else {
                                            tbl2 += `<td style="display:none">`;
                                            tbl2 += ``;
                                            tbl2 += `</td>`;
                                        }
                                        if (maindealerVal != 0) {
                                            tbl2 += `<td style="display:none">`;
                                            tbl2 += `${maindealerVal}`;
                                            tbl2 += `</td>`;
                                        } else {
                                            tbl2 += `<td style="display:none">`;
                                            tbl2 += ``;
                                            tbl2 += `</td>`;
                                        }
                                        if (dealerVal != 0) {
                                            tbl2 += `<td style="display:none">`;
                                            tbl2 += `${dealerVal}`;
                                            tbl2 += `</td>`;
                                        } else {
                                            tbl2 += `<td style="display:none">`;
                                            tbl2 += ``;
                                            tbl2 += `</td>`;
                                        }
                                        if (stateLengthY <= 1) {
                                            tbl2 += `<td style="display:none">`;
                                            tbl2 += `${stateValX}`;
                                            tbl2 += `</td>`;
                                        } else {
                                            tbl2 += `<td style="display:none">`;
                                            tbl2 += ``;
                                            tbl2 += `</td>`;
                                        }
                                        if (cityLengthY <= 1) {
                                            tbl2 += `<td style="display:none">`;
                                            tbl2 += `${cityValX}`;
                                            tbl2 += `</td>`;
                                        } else {
                                            tbl2 += `<td style="display:none">`;
                                            tbl2 += ``;
                                            tbl2 += `</td>`;
                                        }
                                        if (timeVal.length <= 1) {
                                            tbl2 += `<td style="display:none">`;
                                            tbl2 += `${timeVal[0]}`;
                                            tbl2 += `</td>`;
                                        } else {
                                            tbl2 += `<td style="display:none">`;
                                            tbl2 += ``;
                                            tbl2 += `</td>`;
                                        }
                                        tbl2 += `</tr>`;
                                }
                            }
                            else
                            {
                                if(red_arr[i]=="00B050")
                                {
                                        tbl2 += `<tr>`;
                                        tbl2 += `<td style="display:none">`;
                                        tbl2 += `${[i+1]}`;
                                        tbl2 += `</td>`;
                                        tbl2 += `<td>`;
                                        tbl2 += `${ribbon_txt[i]}`;
                                        tbl2 += `</td>`;
                                        tbl2 += `<td>`;
                                        tbl2 += ribbon_val[i];
                                        tbl2 += `</td>`;
                                        tbl2 += `<td style="color:#${green_arr[i]}" data-f-color="${green_arr[i]}">`;
                                        tbl2 += ribbon_val2[i];
                                        tbl2 += `</td>`;
                                        tbl2 += `<td>`;
                                        tbl2 += `${comment2}`;
                                        tbl2 += `</td>`;
                                        if (zoneLengthY <= 1) {
                                            tbl2 += `<td style="display:none">`;
                                            tbl2 += `${zoneValX}`;
                                            tbl2 += `</td>`;
                                        } else {
                                            tbl2 += `<td style="display:none">`;
                                            tbl2 += ``;
                                            tbl2 += `</td>`;
                                        }
                                        if (regionLengthY <= 1) {
                                            tbl2 += `<td style="display:none">`;
                                            tbl2 += `${regionValX}`;
                                            tbl2 += `</td>`;
                                        } else {
                                            tbl2 += `<td style="display:none">`;
                                            tbl2 += ``;
                                            tbl2 += `</td>`;
                                        }
                                        if (maindealerVal != 0) {
                                            tbl2 += `<td style="display:none">`;
                                            tbl2 += `${maindealerVal}`;
                                            tbl2 += `</td>`;
                                        } else {
                                            tbl2 += `<td style="display:none">`;
                                            tbl2 += ``;
                                            tbl2 += `</td>`;
                                        }
                                        if (dealerVal != 0) {
                                            tbl2 += `<td style="display:none">`;
                                            tbl2 += `${dealerVal}`;
                                            tbl2 += `</td>`;
                                        } else {
                                            tbl2 += `<td style="display:none">`;
                                            tbl2 += ``;
                                            tbl2 += `</td>`;
                                        }
                                        if (stateLengthY <= 1) {
                                            tbl2 += `<td style="display:none">`;
                                            tbl2 += `${stateValX}`;
                                            tbl2 += `</td>`;
                                        } else {
                                            tbl2 += `<td style="display:none">`;
                                            tbl2 += ``;
                                            tbl2 += `</td>`;
                                        }
                                        if (cityLengthY <= 1) {
                                            tbl2 += `<td style="display:none">`;
                                            tbl2 += `${cityValX}`;
                                            tbl2 += `</td>`;
                                        } else {
                                            tbl2 += `<td style="display:none">`;
                                            tbl2 += ``;
                                            tbl2 += `</td>`;
                                        }
                                        if (timeVal.length <= 1) {
                                            tbl2 += `<td style="display:none">`;
                                            tbl2 += `${timeVal[0]}`;
                                            tbl2 += `</td>`;
                                        } else {
                                            tbl2 += `<td style="display:none">`;
                                            tbl2 += ``;
                                            tbl2 += `</td>`;
                                        }
                                        tbl2 += `</tr>`;
                                }
                            }
                        }
                    }
                    $("#allT > tbody").empty().append(tbl);
                    $("#allT2 > tbody").empty().append(tbl2);
                    $("#tblOver > tbody").empty().append(tbl3);
                    $("#tblKey > tbody").empty().append(tbl2);

                }
            });
            
        }
    }

                        

    
    //=================================Chart Start============================================
    var zonalPDF;
    ////////debugger;
    function zonalChart(arr, zoneVal) {
        //////debugger;
        zonalPDF = new Highcharts.Chart('zonal', {
            chart: {
                type: 'bar',
                height: 400,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: ''
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: zoneVal,
                //type: 'category',
                title: {
                    text: null
                }
            },
            yAxis: {
                min: 0,
                max: 150,
                title: {
                    text: '',
                    align: 'high'
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: ''
            },
            plotOptions: {
                bar: {
                    dataLabels: {
                        enabled: true,
                        x: 0,
                        y: -4,
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';
                        },
                    },
                },
                series: {
                    cursor: 'pointer',
                    pointWidth: 20,
                    grouping: false,
                    colorByPoint: true,
                    colors: ['#a6a6a6', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99',
                        '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99',
                        '#004D99'
                    ],
                }

            },
            legend: {
                enabled: false
            },
            credits: {
                enabled: false
            },
            series: arr
        });
    }

    var zonal2PDF;
    ////////debugger;
    function zonalChart2(arr, arr2) {
        ////////debugger;
        zonalPDF = new Highcharts.Chart('zonal2', {
            chart: {
                type: 'bar',
                height: 400,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: ''
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: arr2,
                //type: 'category',
                title: {
                    text: null
                }
            },
            yAxis: {
                min: 0,
                max: 1500,
                title: {
                    text: '',
                    align: 'high'
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: ''
            },
            plotOptions: {
                bar: {
                    dataLabels: {
                        enabled: true,
                        x: 0,
                        y: -4,
                        formatter: function() {
                            return (this.y);
                        },
                    },
                },
                series: {
                    cursor: 'pointer',
                    pointWidth: 20,
                    grouping: false,
                    colorByPoint: true,
                    colors: ['#a6a6a6', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99',
                        '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99',
                        '#004D99'
                    ],
                }

            },
            legend: {
                enabled: false
            },
            credits: {
                enabled: false
            },
            series: arr
        });
    }

    var regionalPDF;
    ////////debugger;
    function regionalChart(arr, regionVal) {
        ////////debugger;
        regionalPDF = new Highcharts.Chart('regional', {
            chart: {
                type: 'bar',
                height: 500,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: ''
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: regionVal,
                //type: 'category',
                title: {
                    text: null
                }
            },
            yAxis: {
                min: 0,
                max: 150,
                title: {
                    text: '',
                    align: 'high'
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: ''
            },
            plotOptions: {
                bar: {
                    dataLabels: {
                        enabled: true,
                        x: 0,
                        y: -4,
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';
                        },
                    },
                },
                series: {
                    cursor: 'pointer',
                    pointWidth: 20,
                    grouping: false,
                    colorByPoint: true,
                    colors: ['#a6a6a6', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99',
                        '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99',
                        '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99',
                        '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99',
                        '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99',
                        '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99',
                        '#004D99'
                    ],
                }

            },
            legend: {
                enabled: false
            },
            credits: {
                enabled: false
            },
            series: arr
        });
    }

    var regional2PDF;
    ////////debugger;
    function regionalChart2(arr, regionVal) {
        ////////debugger;
        regionalPDF = new Highcharts.Chart('regional2', {
            chart: {
                type: 'bar',
                height: 500,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: ''
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: regionVal,
                //type: 'category',
                title: {
                    text: null
                }
            },
            yAxis: {
                min: 0,
                max: 1500,
                title: {
                    text: '',
                    align: 'high'
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: ''
            },
            plotOptions: {
                bar: {
                    dataLabels: {
                        enabled: true,
                        x: 0,
                        y: -4,
                        formatter: function() {
                            return (this.y);
                        },
                    },
                },
                series: {
                    cursor: 'pointer',
                    pointWidth: 20,
                    grouping: false,
                    colorByPoint: true,
                    colors: ['#a6a6a6', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99',
                        '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99',
                        '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99',
                        '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99',
                        '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99',
                        '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99',
                        '#004D99'
                    ],
                }

            },
            legend: {
                enabled: false
            },
            credits: {
                enabled: false
            },
            series: arr
        });
    }


    var TopdealerPDF;

    function TopdealerChart(lucifer) {
        Topdealer = new Highcharts.Chart('top_dealer', {
            chart: {
                "backgroundColor": "transparent",
                height: 350,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: ['Dealer 1', 'Dealer 2', 'Dealer 3', 'Dealer 4', 'Dealer 5', 'Dealer 6', 'Dealer 7',
                    'Dealer 8', 'Dealer 9', 'Dealer 10',
                ],
                labels: {
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 1200,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 40,
                        y: 0,
                        formatter: function() {
                            return (this.y);
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#004D99'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    var ToptrendingPDF;

    function ToptrendingChart(lucifer) {
        Toptrending = new Highcharts.Chart('trending', {
            chart: {
                "backgroundColor": "transparent",
                height: 350,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: <?php echo json_encode($custom_arr); ?>,
                labels: {
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 110,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 40,
                        y: 0,
                        formatter: function() {
                            return (this.y) + "%";
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#CC0052'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    var ratingPDF;

    function ratingChart(lucifer) {
        rating = new Highcharts.Chart('rating', {
            chart: {
                "backgroundColor": "transparent",
                height: 350,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: <?php echo json_encode($custom_arr); ?>,
                labels: {
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 110,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 40,
                        y: 0,
                        formatter: function() {
                            return (this.y) + "%";
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#00B3B3'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    var customerPDF;

    function customerChart(cat, val) {
        customer = new Highcharts.Chart('customer', {
            chart: {
                "backgroundColor": "transparent",
                height: 350,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: cat,
                labels: {
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 110,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 40,
                        y: 0,
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#FF9900'],

                }
            },
            series: [{
                showInLegend: false,
                data: val,
            }]
        });
    }
    
    
    
    function customerChartX(cat, val) {
        customer = new Highcharts.Chart('customerX', {
            chart: {
                "backgroundColor": "transparent",
                height: 350,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: cat,
                labels: {
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 110,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 40,
                        y: 0,
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#FF9900'],

                }
            },
            series: [{
                showInLegend: false,
                data: val,
            }]
        });
    }

    var benchindianpsPDF;

    function benchindianpsChart(lucifer) {
        benchindianps = new Highcharts.Chart('benchallindia_nps', {
            chart: {
                "backgroundColor": "transparent",
                height: 150,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                <?php if($_SESSION['user_type']==1){
?>
                categories: ["Dealer NPS", "Hyundai NPS"],
                <?php }	 else{ ?>
                categories: ["Dealer NPS"],
                <?php }	 ?>
                labels: {
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 110,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 40,
                        y: 0,
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },

                series: {
                    pointWidth: 30,
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#004D99'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    var benchzonenpsPDF;

    function benchzonenpsChart(lucifer) {
        benchzonenps = new Highcharts.Chart('benchzone_nps', {
            chart: {
                "backgroundColor": "transparent",
                height: 150,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: ["Zone", "Zone"],
                labels: {
                    enabled: false,
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 110,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 40,
                        y: 0,
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },

                series: {
                    pointWidth: 30,
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#00B3B3'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    var benchregionnpsPDF;

    function benchregionnpsChart(lucifer) {
        benchregionnps = new Highcharts.Chart('benchregion_nps', {
            chart: {
                "backgroundColor": "transparent",
                height: 150,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: ['Region'],
                labels: {
                    enabled: false,
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 110,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 40,
                        y: 0,
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },

                series: {
                    pointWidth: 30,
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#00AAFF'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }
    var Xbenchregionnps;

    function Q19e2F(lucifer) {
        Xbenchregionnps = new Highcharts.Chart('Q19e2', {
            chart: {
                "backgroundColor": "transparent",
                height: 150,
                type: 'bar',
            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: ["%Satisfied", "%Dissatisfied"],
                labels: {
                    enabled: true,
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none',
                        whiteSpace: 'nowrap',
                    }
                }
            },
            yAxis: {
                min: 0,
                max: 110,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        x: 40,
                        y: 0,
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },
                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#00B050', '#FF9900'],
                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    };
    var benchdealernps;

    function benchdealernpsChart(lucifer) {
        benchdealernps = new Highcharts.Chart('benchdealer_nps', {
            chart: {
                "backgroundColor": "transparent",
                height: 150,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: ['Dealer'],
                labels: {
                    enabled: false,
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 110,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 40,
                        y: 0,
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },

                series: {
                    pointWidth: 30,
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#BF77F6'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    var benchsubdealernpsPDF;

    function benchsubdealernpsChart(lucifer) {
        benchdealernps = new Highcharts.Chart('benchsubdealer_nps', {
            chart: {
                "backgroundColor": "transparent",
                height: 150,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: ['Dealer'],
                labels: {
                    enabled: false,
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 110,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 40,
                        y: 0,
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },

                series: {
                    pointWidth: 30,
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#BF77F6'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    var benchstatenpsPDF;

    function benchstatenpsChart(lucifer) {
        benchstatenpsPDF = new Highcharts.Chart('benchstate_nps', {
            chart: {
                "backgroundColor": "transparent",
                height: 150,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: ['State'],
                labels: {
                    enabled: false,
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 110,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 40,
                        y: 0,
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },

                series: {
                    pointWidth: 30,
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#BF77F6'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    var benchcitynpsPDF;

    function benchcitynpsChart(lucifer) {
        benchcitynpsPDF = new Highcharts.Chart('benchcity_nps', {
            chart: {
                "backgroundColor": "transparent",
                height: 150,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: ['City'],
                labels: {
                    enabled: false,
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 110,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 40,
                        y: 0,
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },

                series: {
                    pointWidth: 30,
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#BF77F6'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    var benchindiassiPDF;

    function benchindiassiChart(lucifer) {
        benchindiassi = new Highcharts.Chart('benchallindia_ssi', {
            chart: {
                "backgroundColor": "transparent",
                height: 150,
                type: 'bar',
                marginLeft: 90
            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: ["SSI"],
                labels: {
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 1500,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 40,
                        y: 0,
                        formatter: function() {
                            return (this.y);
                        },
                        enabled: true
                    }
                },

                series: {
                    pointWidth: 30,
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#004D99'],

                }
            },
            series: [{
                showInLegend: false,
                data: [lucifer],
            }]
        });
    }

    var benchzonessiPDF;

    function benchzonessiChart(lucifer) {
        benchzonessi = new Highcharts.Chart('benchzone_ssi', {
            chart: {
                "backgroundColor": "transparent",
                height: 150,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: ['Zone'],
                labels: {
                    enabled: false,
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 1500,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 40,
                        y: 0,
                        formatter: function() {
                            return (this.y);
                        },
                        enabled: true
                    }
                },

                series: {
                    pointWidth: 30,
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#00B3B3'],

                }
            },
            series: [{
                showInLegend: false,
                data: [lucifer],
            }]
        });
    }

    var benchregionssiPDF;

    function benchregionssiChart(lucifer) {
        benchregionssi = new Highcharts.Chart('benchregion_ssi', {
            chart: {
                "backgroundColor": "transparent",
                height: 150,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: ['Region'],
                labels: {
                    enabled: false,
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 1500,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 40,
                        y: 0,
                        formatter: function() {
                            return (this.y);
                        },
                        enabled: true
                    }
                },

                series: {
                    pointWidth: 30,
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#00AAFF'],

                }
            },
            series: [{
                showInLegend: false,
                data: [lucifer],
            }]
        });
    }

    var benchdealerssiPDF;

    function benchdealerssiChart(lucifer) {
        benchdealerssi = new Highcharts.Chart('benchdealer_ssi', {
            chart: {
                "backgroundColor": "transparent",
                height: 150,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: ['Dealer'],
                labels: {
                    enabled: false,
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 1500,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 40,
                        y: 0,
                        formatter: function() {
                            return (this.y);
                        },
                        enabled: true
                    }
                },

                series: {
                    pointWidth: 30,
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#BF77F6'],

                }
            },
            series: [{
                showInLegend: false,
                data: [lucifer],
            }]
        });
    }

    var benchdsubealerssiPDF;

    function benchsubdealerssiChart(lucifer) {
        benchdealerssi = new Highcharts.Chart('benchsubdealer_ssi', {
            chart: {
                "backgroundColor": "transparent",
                height: 150,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: ['Dealer'],
                labels: {
                    enabled: false,
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 1500,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 40,
                        y: 0,
                        formatter: function() {
                            return (this.y);
                        },
                        enabled: true
                    }
                },

                series: {
                    pointWidth: 30,
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#BF77F6'],

                }
            },
            series: [{
                showInLegend: false,
                data: [lucifer],
            }]
        });
    }

    var benchdstatessiPDF;

    function benchstatessiChart(lucifer) {
        benchdealerssi = new Highcharts.Chart('benchstate_ssi', {
            chart: {
                "backgroundColor": "transparent",
                height: 150,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: ['Dealer'],
                labels: {
                    enabled: false,
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 1500,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 40,
                        y: 0,
                        formatter: function() {
                            return (this.y);
                        },
                        enabled: true
                    }
                },

                series: {
                    pointWidth: 30,
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#BF77F6'],

                }
            },
            series: [{
                showInLegend: false,
                data: [lucifer],
            }]
        });
    }

    var benchdcityssiPDF;

    function benchcityssiChart(lucifer) {
        benchdealerssi = new Highcharts.Chart('benchcity_ssi', {
            chart: {
                "backgroundColor": "transparent",
                height: 150,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: ['Dealer'],
                labels: {
                    enabled: false,
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 1500,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 40,
                        y: 0,
                        formatter: function() {
                            return (this.y);
                        },
                        enabled: true
                    }
                },

                series: {
                    pointWidth: 30,
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#BF77F6'],

                }
            },
            series: [{
                showInLegend: false,
                data: [lucifer],
            }]
        });
    }

    var benchstatefactorPDF;

    function benchstatefactorChart(lucifer) {
        benchstatefactor = new Highcharts.Chart('benchstate_factor', {
            chart: {
                "backgroundColor": "transparent",
                height: 190,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: <?php echo json_encode($tabs3); ?>,
                labels: {
                    enabled: false,
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 1500,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 40,
                        y: 0,
                        formatter: function() {
                            return (this.y);
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#004D99'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    var benchcityfactorPDF;

    function benchcityfactorChart(lucifer) {
        benchcityfactor = new Highcharts.Chart('benchcity_factor', {
            chart: {
                "backgroundColor": "transparent",
                height: 190,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: <?php echo json_encode($tabs3); ?>,
                labels: {
                    enabled: false,
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 1500,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 40,
                        y: 0,
                        formatter: function() {
                            return (this.y);
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#004D99'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    var benchindiafactorPDF;

    function benchindiafactorChart(lucifer) {
        benchindiafactor = new Highcharts.Chart('benchallindia_factor', {
            chart: {
                "backgroundColor": "transparent",
                height: 190,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: <?php echo json_encode($tabs3); ?>,
                labels: {
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 1500,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 40,
                        y: 0,
                        formatter: function() {
                            return (this.y);
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#004D99'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    var benchzonefactorPDF;

    function benchzonefactorChart(lucifer) {
        benchzonefactor = new Highcharts.Chart('benchzone_factor', {
            chart: {
                "backgroundColor": "transparent",
                height: 190,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: <?php echo json_encode($tabs3); ?>,
                labels: {
                    enabled: false,
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 1500,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 40,
                        y: 0,
                        formatter: function() {
                            return (this.y);
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#00B3B3'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    var benchregionfactorPDF;

    function benchregionfactorChart(lucifer) {
        benchregionfactor = new Highcharts.Chart('benchregion_factor', {
            chart: {
                "backgroundColor": "transparent",
                height: 190,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: <?php echo json_encode($tabs3); ?>,
                labels: {
                    enabled: false,
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 1500,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 40,
                        y: 0,
                        formatter: function() {
                            return (this.y);
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#00AAFF'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    var benchdealerfactorPDF;

    function benchdealerfactorChart(lucifer) {
        benchdealerfactor = new Highcharts.Chart('benchdealer_factor', {
            chart: {
                "backgroundColor": "transparent",
                height: 190,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: <?php echo json_encode($tabs3); ?>,
                labels: {
                    enabled: false,
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 1500,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 40,
                        y: 0,
                        formatter: function() {
                            return (this.y);
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#BF77F6'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    var benchsubdealerfactorPDF;

    function benchsubdealerfactorChart(lucifer) {
        benchsubdealerfactor = new Highcharts.Chart('benchsubdealer_factor', {
            chart: {
                "backgroundColor": "transparent",
                height: 190,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: <?php echo json_encode($tabs3); ?>,
                labels: {
                    enabled: false,
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 1500,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 40,
                        y: 0,
                        formatter: function() {
                            return (this.y);
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#BF77F6'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    function SSI(lucifer) {
        Highcharts.chart('ssiperformance', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#004d99'
                }, {
                    y: 1000 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function QSAT(lucifer) {
        Highcharts.chart('qsat', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },

            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#004D99'
                }, {
                    y: 1000 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function Q4(lucifer) {
        Highcharts.chart('q4', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}%</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },

            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#004D99'
                }, {
                    y: 100 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function Q8(lucifer) {
        Highcharts.chart('q8', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}%</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },

            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#004D99'
                }, {
                    y: 100 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function Q5(lucifer) {
        Highcharts.chart('q5', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}%</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#004D99'
                }, {
                    y: 100 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function Q9(lucifer) {
        Highcharts.chart('q9', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}%</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#004D99'
                }, {
                    y: 100 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function Q11(lucifer) {
        Highcharts.chart('q11', {
            chart: {

                type: 'pie',
                height: 170,
                //marginLeft:-50
            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}%</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#004D99'
                }, {
                    y: 100 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function overallHyundai(lucifer) {
        Highcharts.chart('overall_hyundai', {
            chart: {

                type: 'pie',
                height: 170,
                //marginLeft:-50
            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#004D99'
                }, {
                    y: 1000 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function Q15(lucifer) {
        // alert(lucifer);
        //////debugger;
        Highcharts.chart('q15', {
            chart: {

                type: 'pie',
                height: 170,
            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}%</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#004d99'
                }, {
                    y: 100 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function Q15a(lucifer) {
        Highcharts.chart('q15a', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}%</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#004D99'
                }, {
                    y: 100 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function Q15c(lucifer) {
        Highcharts.chart('q15c', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}%</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#004D99'
                }, {
                    y: 100 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function f1(lucifer) {
        Highcharts.chart('f1', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#004d99'
                }, {
                    y: 1000 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function f2(lucifer) {
        Highcharts.chart('f2', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#004D99'
                }, {
                    y: 1000 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function f3(lucifer) {
        Highcharts.chart('f3', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#004d99'
                }, {
                    y: 1000 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function f4(lucifer) {
        Highcharts.chart('f4', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#004d99'
                }, {
                    y: 1000 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function f5(lucifer) {
        Highcharts.chart('f5', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#004d99'
                }, {
                    y: 1000 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function f6(lucifer) {
        Highcharts.chart('f6', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#004d99'
                }, {
                    y: 1000 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }












    var Q12PDF;

    function Q12(lucifer) {
        Q12PDF = new Highcharts.Chart('q12', {
            chart: {
                "backgroundColor": "transparent",
                height: 145,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: ['% Satisfied', '% Dissatisfied'],
                labels: {
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 120,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}%</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 60,
                        y: 0,
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#00B050', '#FF9900'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    var Q13PDF;

    function Q13(lucifer) {
        Q12PDF = new Highcharts.Chart('q13', {
            chart: {
                "backgroundColor": "transparent",
                height: 145,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: ['% Satisfied', '% Dissatisfied'],
                labels: {
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 120,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}%</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 60,
                        y: 0,
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#00B050', '#FF9900'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }


    var Q14PDF;

    function Q14(lucifer) {
        Q14PDF = new Highcharts.Chart('q14', {
            chart: {
                "backgroundColor": "transparent",
                height: 145,
                type: 'bar',

            },
            title: {
                text: ``,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: ['% Satisfied', '% Dissatisfied'],
                labels: {
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 120,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}%</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 60,
                        y: 0,
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#00B050', '#FF9900'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    var Q15bPDF;

    function Q15b(lucifer) {
        Q15bPDF = new Highcharts.Chart('q15b', {
            chart: {
                "backgroundColor": "transparent",
                height: 130,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: ['% Satisfied', '% Dissatisfied'],
                labels: {
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 120,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}%</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 60,
                        y: 0,
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#00B050', '#FF9900'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    var Q15dPDF;

    function Q15d(lucifer) {
        Q15dPDF = new Highcharts.Chart('q15d', {
            chart: {
                "backgroundColor": "transparent",
                height: 130,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: ['% Satisfied', '% Dissatisfied'],
                labels: {
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 120,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}%</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 60,
                        y: 0,
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#00B050', '#FF9900'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    var Q24PDF;

    function Q24(lucifer) {
        Q24PDF = new Highcharts.Chart('q24', {
            chart: {
                "backgroundColor": "transparent",
                height: 170,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: ['Satisfied', 'Unsatisfies'],
                labels: {
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 120,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}%</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 60,
                        y: 0,
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#DBA39A'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }



    var Q27PDF;

    function Q27(lucifer) {
        Q27PDF = new Highcharts.Chart('q27', {
            chart: {
                "backgroundColor": "transparent",
                height: 170,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: ['Satisfied', 'Unsatisfies'],
                labels: {
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 120,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}%</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 60,
                        y: 0,
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#003266'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    var salesYesPDF;

    function salesYes(lucifer) {
        salesYesPDF = new Highcharts.Chart('sales_yes', {
            chart: {
                "backgroundColor": "transparent",
                height: 300,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: <?php echo json_encode($sales_yesN); ?>,
                labels: {
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 150,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}%</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 60,
                        y: 0,
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#004D99'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    var salesNoPDF;
    //debugger;
    function salesNo(lucifer,maxV) {
        salesNoPDF = new Highcharts.Chart('sales_no', {
            chart: {
                "backgroundColor": "transparent",
                height: 300,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: <?php echo json_encode($sales_noN); ?>,
                labels: {
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'normal',  
						width:'250px',
	
                    }
                }
            },
            yAxis: {
                min: 0,
                max: maxV,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}%</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 60,
                        y: 0,
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#fb9700'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    function overallFacility(lucifer) {
        Highcharts.chart('overall_facility', {
            chart: {

                type: 'pie',
                height: 170,
            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center",
                    "margin": "0 auto"
                },
                x: 5,
                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#004d99'
                }, {
                    y: 1000 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function Q17(lucifer) {
        Highcharts.chart('q17', {
            chart: {

                type: 'pie',
                height: 170,
            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}%</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center",
                    "margin": "0 auto"
                },
                x: 5,
                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#FF9900'
                }, {
                    y: 100 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function Q18a(lucifer) {
        Highcharts.chart('q18a', {
            chart: {

                type: 'pie',
                height: 170,
            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}%</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center",
                    "margin": "0 auto"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#FF9900'
                }, {
                    y: 100 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }


    function Q18c(lucifer) {
        Highcharts.chart('q18c', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}%</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center",
                    "margin": "0 auto"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#FF9900'
                }, {
                    y: 100 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function Q18d(lucifer) {
        Highcharts.chart('q18d', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}%</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center",
                    "margin": "0 auto"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#FF9900'
                }, {
                    y: 100 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }


    function Q19a1(lucifer) {
        Highcharts.chart('q19a1', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}%</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#004d99'
                }, {
                    y: 100 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function Q19a2(lucifer) {
        Highcharts.chart('q19a2', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}%</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#004D99'
                }, {
                    y: 100 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function Q19a3(lucifer) {
        Highcharts.chart('q19a3', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}%</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#cc0052'
                }, {
                    y: 100 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function Q19a(lucifer) {
        Highcharts.chart('q19a', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}%</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#00b3b3'
                }, {
                    y: 100 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function Q19b(lucifer) {
        Highcharts.chart('q19b', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}%</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#00AAFF'
                }, {
                    y: 100 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function Q19d(lucifer) {
        Highcharts.chart('q19d', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}%</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#BF77F6'
                }, {
                    y: 100 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function Q19e(lucifer) {
        Highcharts.chart('q19e', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}%</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#00b359'
                }, {
                    y: 100 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function Q19e3(lucifer) {
        Highcharts.chart('q19e3', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}%</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#ff6600'
                }, {
                    y: 100 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function Q19f(lucifer) {
        Highcharts.chart('q19f', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}%</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#00aaff'
                }, {
                    y: 100 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function Q20(lucifer) {
        Highcharts.chart('q20', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}%</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#004d99'
                }, {
                    y: 100 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function Q21(lucifer) {
        Highcharts.chart('q21', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}%</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#004D99'
                }, {
                    y: 100 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    var Q23PDF;

    function Q23(lucifer) {
        Q23PDF = new Highcharts.Chart('q23', {
            chart: {
                "backgroundColor": "transparent",
                height: 170,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: ['a.Test drive at another dealership', 'b.Didn\'t want/need test drive',
                    'c.Test drive vehicle was unavailable'
                ],
                labels: {
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 120,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}%</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 60,
                        y: 0,
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#004D99'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    var Q22PDF;

    function Q22(lucifer) {
        Q22PDF = new Highcharts.Chart('q22', {
            chart: {
                "backgroundColor": "transparent",
                height: 170,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: ['% Satisfied', '% Dissatisfied'],
                labels: {
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 120,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}%</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 60,
                        y: 0,
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#00B050', '#FF9900'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    function overallDeal(lucifer) {
        Highcharts.chart('overall_deal', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#004D99'
                }, {
                    y: 1000 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function Q24(lucifer) {
        Highcharts.chart('q24', {
            chart: {

                type: 'pie',
                height: 170,
            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}%</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center",
                    "margin": "0 auto"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#FF9900'
                }, {
                    y: 100 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    var Q25PDF;

    function Q25(lucifer,maxX) {
        Q25PDF = new Highcharts.Chart('q25', {
            chart: {
                "backgroundColor": "transparent",
                height: 250,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: <?php echo json_encode($dealN); ?>,
                labels: {
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: maxX,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}%</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 60,
                        y: 0,
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#FF9900'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    function overallTime(lucifer) {
        Highcharts.chart('overall_time', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#004D99'
                }, {
                    y: 1000 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function Q26N(lucifer) {
        Highcharts.chart('q26N', {
            chart: {

                type: 'pie',
                height: 170,
            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}%</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center",
                    "margin": "0 auto"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#FF9900'
                }, {
                    y: 100 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    var Q26aPDF;

    function Q26a(lucifer,Q26aVmax) {
        Q26aPDF = new Highcharts.Chart('q26a', {
            chart: {
                "backgroundColor": "transparent",
                height: 250,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: <?php echo json_encode($paperwork_timeN); ?>,
                labels: {
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: Q26aVmax,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}%</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 60,
                        y: 0,
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#FF9900', '#FAFA33', '#00B050'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    var Q26bPDF;

    function Q26b(lucifer,Q26bVmax) {
        Q26bPDF = new Highcharts.Chart('q26b', {
            chart: {
                "backgroundColor": "transparent",
                height: 250,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: <?php echo json_encode($paperwork_processN); ?>,
                labels: {
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: Q26bVmax,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}%</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 60,
                        y: 0,
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#00B050', '#FAFA33', '#FF9900'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    var Q26PDF;

    function Q26(lucifer,Q26Vmax) {
        Q26PDF = new Highcharts.Chart('q26', {
            chart: {
                "backgroundColor": "transparent",
                height: 250,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: <?php echo json_encode($paperwork_attributeN); ?>,
                labels: {
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: Q26Vmax,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}%</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 60,
                        y: 0,
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#FF9900'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    var Q28aPDF;

    function Q28a(lucifer,Q28aVmax) {
        Q28aPDF = new Highcharts.Chart('q28a', {
            chart: {
                "backgroundColor": "transparent",
                height: 190,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: <?php echo json_encode($delivery_conditionN); ?>,
                labels: {
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: Q28aVmax,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}%</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 60,
                        y: 0,
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#00B050', '#FF9900', '#FF9900', '#FF9900', '#FF9900'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    var Q28bPDF;

    function Q28b(lucifer,Q28bVmax) {
        Q28bPDF = new Highcharts.Chart('q28b', {
            chart: {
                "backgroundColor": "transparent",
                height: 190,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: <?php echo json_encode($delivery_qualityN); ?>,
                labels: {
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: Q28bVmax,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}%</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 60,
                        y: 0,
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#00B050', '#FAFA33', '#FF9900'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    var Q28ePDF;

    function Q28e(lucifer,Q28eVmax) {
        Q28ePDF = new Highcharts.Chart('q28e', {
            chart: {
                "backgroundColor": "transparent",
                height: 190,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: <?php echo json_encode($delivery_timeN); ?>,
                labels: {
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: Q28eVmax,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}%</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 60,
                        y: 0,
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#00B050', '#FAFA33', '#FF9900'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    function overallService(lucifer) {
        Highcharts.chart('overall_service', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#004D99'
                }, {
                    y: 1000 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function Q27(lucifer) {
        Highcharts.chart('q27', {
            chart: {

                type: 'pie',
                height: 170,
            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}%</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center",
                    "margin": "0 auto"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#FF9900'
                }, {
                    y: 100 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function Q28d(lucifer) {
        Highcharts.chart('q28d', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}%</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },
                x: 5,
                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#004d99'
                }, {
                    y: 100 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    var deliveryAttrPDF;

    function deliveryAttr(cat, val) {
        deliveryAttrPDF = new Highcharts.Chart('delivery_att', {
            chart: {
                "backgroundColor": "transparent",
                height: 250,
                type: 'bar',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: cat,
                labels: {
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 150,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}%</b> <br/>',
                shared: true
            },
            plotOptions: {
                bar: {
                    stacking: 'normal',
                    dataLabels: {
                        horizontalAlign: 'right',
                        color: '#000000',
                        align: 'right',
                        /*style: {
                            textOutline: false
                        },*/
                        x: 60,
                        y: 0,
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#33CC33'],

                }
            },
            series: [{
                showInLegend: false,
                data: val,
            }]
        });
    }

    function host(lucifer) {
        Highcharts.chart('host', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#004D99'
                }, {
                    y: 1000 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function empathy(lucifer) {
        Highcharts.chart('empathy', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#004D99'
                }, {
                    y: 1000 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function anticipate(lucifer) {
        Highcharts.chart('anticipate', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#004D99'
                }, {
                    y: 1000 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function respect(lucifer) {
        Highcharts.chart('respect', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#004D99'
                }, {
                    y: 1000 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function thanks(lucifer) {
        Highcharts.chart('thanks', {
            chart: {

                type: 'pie',
                height: 170,

            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#004D99'
                }, {
                    y: 1000 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }












    function npsVi(lucifer) {
        $('#nps1').highcharts({
            chart: {
                "backgroundColor": "transparent",
                type: 'gauge',
                plotBackgroundColor: null,
                plotBackgroundImage: null,
                plotBorderWidth: 0,
                plotShadow: false,
                height: 225,
                marginLeft: -50
            },
            title: {
                text: ''
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            plotOptions: {
                gauge: {
                    allowPointSelect: true,
                    states: {
                        hover: {
                            enabled: true,
                            marker: {
                                fillColor: "#FF9900",
                                lineColor: "#0000FF",
                                lineWidth: 5
                            }
                        }
                    }
                }
            },

            pane: {
                startAngle: -150,
                endAngle: 150,
                background: [{
                    backgroundColor: {
                        linearGradient: {
                            x1: 0,
                            y1: 0,
                            x2: 0,
                            y2: 1
                        },
                        stops: [
                            [0, '#FFF'],
                            [1, '#333']
                        ]
                    },
                    borderWidth: 0,
                    outerRadius: '109%'
                }, {
                    backgroundColor: {
                        linearGradient: {
                            x1: 0,
                            y1: 0,
                            x2: 0,
                            y2: 1
                        },
                        stops: [
                            [0, '#333'],
                            [1, '#FFF']
                        ]
                    },
                    borderWidth: 1,
                    outerRadius: '107%'
                }, {
                    // default background
                }, {
                    backgroundColor: '#DDD',
                    borderWidth: 0,
                    outerRadius: '105%',
                    innerRadius: '103%'
                }]
            },

            // the value axis
            yAxis: {
                min: -100,
                max: 100,

                minorTickInterval: 'auto',
                minorTickWidth: 1,
                minorTickLength: 10,
                minorTickPosition: 'inside',
                minorTickColor: '#666',

                tickPixelInterval: 30,
                tickWidth: 2,
                tickPosition: 'inside',
                tickLength: 10,
                tickColor: '#666',
                labels: {
                    step: 2,
                    rotation: 'auto'
                },
                title: {
                    text: ''
                },
                plotBands: [{
                    from: -100,
                    to: 0,
                    color: '#DF5353' // red
                }, {
                    from: 0,
                    to: 100,
                    color: '#55BF3B' // green
                }]
            },

            series: lucifer

        });
    }

    function npsVi2(lucifer) {
        $('#nps2').highcharts({
            chart: {
                "backgroundColor": "transparent",
                type: 'gauge',
                plotBackgroundColor: null,
                plotBackgroundImage: null,
                plotBorderWidth: 0,
                plotShadow: false,
                height: 225,
                marginLeft: -50
            },
            title: {
                text: ''
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            plotOptions: {
                gauge: {
                    allowPointSelect: true,
                    states: {
                        hover: {
                            enabled: true,
                            marker: {
                                fillColor: "#FF9900",
                                lineColor: "#0000FF",
                                lineWidth: 5
                            }
                        }
                    }
                }
            },

            pane: {
                startAngle: -150,
                endAngle: 150,
                background: [{
                    backgroundColor: {
                        linearGradient: {
                            x1: 0,
                            y1: 0,
                            x2: 0,
                            y2: 1
                        },
                        stops: [
                            [0, '#FFF'],
                            [1, '#333']
                        ]
                    },
                    borderWidth: 0,
                    outerRadius: '109%'
                }, {
                    backgroundColor: {
                        linearGradient: {
                            x1: 0,
                            y1: 0,
                            x2: 0,
                            y2: 1
                        },
                        stops: [
                            [0, '#333'],
                            [1, '#FFF']
                        ]
                    },
                    borderWidth: 1,
                    outerRadius: '107%'
                }, {
                    // default background
                }, {
                    backgroundColor: '#DDD',
                    borderWidth: 0,
                    outerRadius: '105%',
                    innerRadius: '103%'
                }]
            },

            // the value axis
            yAxis: {
                min: -100,
                max: 100,

                minorTickInterval: 'auto',
                minorTickWidth: 1,
                minorTickLength: 10,
                minorTickPosition: 'inside',
                minorTickColor: '#666',

                tickPixelInterval: 30,
                tickWidth: 2,
                tickPosition: 'inside',
                tickLength: 10,
                tickColor: '#666',
                labels: {
                    step: 2,
                    rotation: 'auto'
                },
                title: {
                    text: ''
                },
                plotBands: [{
                    from: -100,
                    to: 0,
                    color: '#DF5353' // red
                }, {
                    from: 0,
                    to: 100,
                    color: '#55BF3B' // green
                }]
            },

            series: lucifer

        });
    }



    function factor(lucifer) {
        Highcharts.chart('factor_chart', {
            chart: {
                "backgroundColor": "transparent",
                type: 'column',
                height: 250,
                width: 800
            },
            title: {
                text: null,
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: [<?php echo "'".implode("','",$factor_arr)."'"?>],
                crosshair: true
            },
            yAxis: {
                min: 0,
                max: 1100,
                gridLineWidth: 0,
                labels: {
                    enabled: false
                },
                title: {
                    text: ''
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}</b> <br/>',
                shared: true
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    stacking: 'normal',
                    dataLabels: {
                        verticalAlign: 'top',
                        color: 'black',
                        align: 'center',
                        x: 3,
                        y: -35,
                        formatter: function() {
                            return Math.round(this.y);
                        },
                        enabled: true
                    }
                },
                series: {
                    pointWidth: 40,
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#003e80'],
                }
            },
            credits: {
                enabled: false
            },
            legend: {
                enabled: false
            },
            series: lucifer
        });

    }

    var attributesPDF;
    ////////debugger;
    function attributesChart(arr, arr2) {
        ////////debugger;
        attributesPDF = new Highcharts.Chart('attributes', {
            chart: {
                type: 'bar',
                height: 480,
                width: 900
            },
            title: {
                text: ''
            },
            subtitle: {
                text: ''
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: <?php echo json_encode($attr_arr); ?>,
                //type: 'category',
                title: {
                    text: null
                }
            },
            yAxis: {
                min: 0,
                title: {
                    text: '',
                    align: 'high'
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: ''
            },
            plotOptions: {
                bar: {
                    dataLabels: {
                        enabled: true,
                        x: 0,
                        y: -4,
                        formatter: function() {
                            return Math.round(this.y);
                        },
                    },
                    zones: [{
                        value: 900, // Values up to 10 (not including) ...
                        color: '#FEC93B'
                        // ... have the color blue.
                    }, {
                        color: '#80B213' // Values from 10 (including) and up have the color red
                    }]
                },
                series: {
                    cursor: 'pointer',
                    pointWidth: 13,
                    grouping: false,
                }

            },
            // legend: {
            //     enabled:false
            // },
            credits: {
                enabled: false
            },
            series: [arr, arr2]
        });
    }

    var sopPDF;
    ////////debugger;
    function sopChart(arr, arr2) {
        ////////debugger;
        sopPDF = new Highcharts.Chart('sop', {
            chart: {
                type: 'bar',
                height: 480,
                width: 900,
            },
            title: {
                text: ''
            },
            subtitle: {
                text: ''
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: <?php echo json_encode($sop_arr); ?>,
                //type: 'category',
                title: {
                    text: null
                }
            },
            yAxis: {
                min: 0,
                title: {
                    text: '',
                    align: 'high'
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: '%'
            },
            plotOptions: {
                bar: {
                    dataLabels: {
                        enabled: true,
                        x: 0,
                        y: -4,
                        formatter: function() {
                            return Math.round(this.y) + '%';
                        },
                    },
                    zones: [{
                        value: 90, // Values up to 10 (not including) ...
                        color: '#FEC93B'
                        // ... have the color blue.
                    }, {
                        color: '#80B213' // Values from 10 (including) and up have the color red
                    }]
                },
                series: {
                    cursor: 'pointer',
                    pointWidth: 20,
                    grouping: false
                }


            },
            // legend: {
            //     enabled:false
            // },
            credits: {
                enabled: false
            },
            series: [arr, arr2]
        });
    }

    function loyalty1() {
        Highcharts.chart('loyalty1', {
            chart: {

                type: 'pie',
                height: 225,
                marginLeft: -50
            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 30px'>955</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },
                x: -30,
                y: 20,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: 95,
                    color: '#003e80'
                }, {
                    y: 5,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function loyalty2() {
        Highcharts.chart('loyalty2', {
            chart: {

                type: 'pie',
                height: 225,
                marginLeft: -50
            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 30px'>955</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center"
                },
                x: -30,
                y: 20,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: 95,
                    color: '#003e80'
                }, {
                    y: 5,
                    color: '#e3e3e3'
                }]
            }]
        });
    }





    var SsiperformanceTrendsPDF;

    function SsiperformanceTrends(lucifer) {
        SsiperformanceTrendsPDF = new Highcharts.Chart('ssiperformance_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {
                enabled: false,
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return Math.round(this.y);
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#004D99'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var hyundaiNpsTrendsPDF;

    function hyundaiNpsTrends(lucifer) {
        hyundaiNpsTrendsPDF = new Highcharts.Chart('q5_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {
                enabled: false,
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#CC0052'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var hyundaiPreferenceTrendsPDF;

    function hyundaiPreferenceTrends(lucifer) {
        hyundaiPreferenceTrendsPDF = new Highcharts.Chart('q4_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {
                enabled: false,
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#00AAFF'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var dealerNpsTrendsPDF;

    function dealerNpsTrends(lucifer) {
        dealerNpsTrendsPDF = new Highcharts.Chart('q9_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {
                enabled: false,
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#00B3B3'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var dealerpreferenceTrendsPDF;

    function dealerpreferenceTrends(lucifer, namesd) {
        dealerpreferenceTrendsPDF = new Highcharts.Chart('q8_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {
                enabled: false,
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#BF77F6'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var hyundaiwebsiteTrendPDF;

    function hyundaiwebsiteTrend(lucifer) {
        hyundaiwebsiteTrendPDF = new Highcharts.Chart('hyundaiwebsite_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {

                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#004D99', '#CC0052', '#00B3B3', '#BF77F6', '#00AAFF'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var ctbwebsiteTrendPDF;

    function ctbwebsiteTrend(lucifer) {
        ctbwebsiteTrendPDF = new Highcharts.Chart('ctbwebsite_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {

                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#004D99', '#004D99', '#CC0052', '#00B3B3', '#BF77F6', '#00AAFF'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var factorTrendPDF;

    function factorTrend(lucifer) {
        factorTrendPDF = new Highcharts.Chart('factor_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {

                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return Math.round(this.y);
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var dizioverallTrendPDF;

    function dizioverallTrend(lucifer) {
        dizioverallTrendPDF = new Highcharts.Chart('overallhyundaiwebsite_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {
                enabled: false,
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return Math.round(this.y);
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#004D99', '#004D99', '#CC0052', '#00B3B3', '#BF77F6', '#00AAFF'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var facilityoverallTrendPDF;

    function facilityoverallTrend(lucifer, namesd) {
        facilityoverallTrendPDF = new Highcharts.Chart('facilityoverall_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {
                enabled: false,
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return Math.round(this.y);
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#004D99', '#004D99', '#CC0052', '#00B3B3', '#BF77F6', '#00AAFF'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var facilityQ17bTrendPDF;

    function facilityQ17b(lucifer, namesd) {
        facilityQ17bTrendPDF = new Highcharts.Chart('facilityoverall_trends2_1', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {
                enabled: false,
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return this.y + "%";
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#004D99', '#004D99', '#CC0052', '#00B3B3', '#BF77F6', '#00AAFF'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }


    var facilityTrendPDF;

    function facilityTrend(lucifer) {
        facilityTrendPDF = new Highcharts.Chart('facility_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {

                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#004D99', '#004D99', '#CC0052', '#00B3B3', '#BF77F6', '#00AAFF'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    function overallSalesyes(lucifer) {
        Highcharts.chart('overall_sales_yes', {
            chart: {

                type: 'pie',
                height: 170,
            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center",
                    "margin": "0 auto"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#004d99'
                }, {
                    y: 1000 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    function Q19(lucifer) {
        Highcharts.chart('q19', {
            chart: {

                type: 'pie',
                height: 170,
            },
            title: {
                text: ''
            },
            subtitle: {
                text: `<div style='font-size: 20px'>${lucifer}%</div>`,
                align: "center",
                verticalAlign: "middle",
                style: {
                    "textAlign": "center",
                    "margin": "0 auto"
                },

                y: 15,
                useHTML: true
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            series: [{
                type: 'pie',
                enableMouseTracking: false,
                innerSize: '80%',
                dataLabels: {
                    enabled: false
                },
                data: [{
                    y: lucifer,
                    color: '#FF9900'
                }, {
                    y: 100 - lucifer,
                    color: '#e3e3e3'
                }]
            }]
        });
    }

    var zonalssiChartTrendPDF;

    function zonalssiChartTrend(lucifer, namesd) {
        zonalssiChartTrendPDF = new Highcharts.Chart('zonessi_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {

                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return Math.round(this.y);
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#A6A6A6', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var zonalnpsChartTrendPDF;

    function zonalnpsChartTrend(lucifer, namesd) {
        zonalnpsChartTrendPDF = new Highcharts.Chart('zonenps_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {

                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#A6A6A6', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var regionnpsChartTrendPDF;

    function regionnpsChartTrend(lucifer, namesd) {
        regionnpsChartTrendPDF = new Highcharts.Chart('regionnps_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {

                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#A6A6A6', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99',
                '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99',
                '#004D99', '#004D99'
            ],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var regionssiChartTrendPDF;

    function regionssiChartTrend(lucifer, namesd) {
        regionssiChartTrendPDF = new Highcharts.Chart('regionssi_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {

                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return Math.round(this.y);
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#A6A6A6', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99',
                '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99', '#004D99',
                '#004D99', '#004D99', '#004D99'
            ],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var salesoverallTrendPDF;

    function salesoverallTrend(lucifer, namesd) {
        salesoverallTrendPDF = new Highcharts.Chart('salesoverall_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {
                enabled: false,
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return Math.round(this.y);
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#004D99', '#004D99', '#CC0052', '#00B3B3', '#BF77F6', '#00AAFF'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }


    var Q19e2OTrendPDF;

    function Q19e2OTrend(lucifer, namesd) {
        Q19e2OTrendPDF = new Highcharts.Chart('democar_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {
                enabled: false,
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return this.y + "%";
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#004D99', '#004D99', '#CC0052', '#00B3B3', '#BF77F6', '#00AAFF'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }



    var Q19TrendPDF;

    function Q19Trend(lucifer, namesd) {
        Q19TrendPDF = new Highcharts.Chart('q19_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {
                enabled: false,
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return this.y + "%";
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#004D99', '#004D99', '#CC0052', '#00B3B3', '#BF77F6', '#00AAFF'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var salesyesTrendPDF;

    function salesyesTrend(lucifer, namesd) {
        salesyesTrendPDF = new Highcharts.Chart('salesyes_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {

                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#004D99', '#004D99', '#CC0052', '#00B3B3', '#BF77F6', '#00AAFF'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var salesnoTrendPDF;

    function salesnoTrend(lucifer, namesd) {
        salesnoTrendPDF = new Highcharts.Chart('salesno_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {

                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#004D99', '#004D99', '#CC0052', '#00B3B3', '#BF77F6', '#00AAFF'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var driveexpTrendPDF;

    function driveexpTrend(lucifer, namesd) {
        driveexpTrendPDF = new Highcharts.Chart('driveexp_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {

                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#004D99', '#004D99', '#CC0052', '#00B3B3', '#BF77F6', '#00AAFF'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var drivedealerTrendPDF;

    function drivedealerTrend(lucifer, namesd) {
        drivedealerTrendPDF = new Highcharts.Chart('drivedealer_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {

                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#004D99', '#004D99', '#CC0052', '#00B3B3', '#BF77F6', '#00AAFF'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var drivereasonTrendPDF;

    function drivereasonTrend(lucifer, namesd) {
        drivereasonTrendPDF = new Highcharts.Chart('drivereason_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {

                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#004D99', '#004D99', '#CC0052', '#00B3B3', '#BF77F6', '#00AAFF'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var dealoverallTrendPDF;

    function dealoverallTrend(lucifer, namesd) {
        dealoverallTrendPDF = new Highcharts.Chart('dealoverall_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {
                enabled: false,
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return Math.round(this.y);
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#004D99', '#004D99', '#CC0052', '#00B3B3', '#BF77F6', '#00AAFF'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }


    var q24TrendPDF;

    function q24Trend(lucifer, namesd) {
        q24TrendPDF = new Highcharts.Chart('q24_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {
                enabled: false,
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return this.y + "%";
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#004D99', '#004D99', '#CC0052', '#00B3B3', '#BF77F6', '#00AAFF'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var paperq26NTrendPDF;

    function paperq26NTrend(lucifer, namesd) {
        paperq26NTrendPDF = new Highcharts.Chart('paperexp_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {
                enabled: false,
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return this.y + "%";
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#004D99', '#004D99', '#CC0052', '#00B3B3', '#BF77F6', '#00AAFF'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var q27TrendPDF;

    function q27Trend(lucifer, namesd) {
        q27TrendPDF = new Highcharts.Chart('deliverynew_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {
                enabled: false,
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return this.y + "%";
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#004D99', '#004D99', '#CC0052', '#00B3B3', '#BF77F6', '#00AAFF'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var dealTrendPDF;

    function dealTrend(lucifer, namesd) {
        dealTrendPDF = new Highcharts.Chart('deal_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {

                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#004D99', '#004D99', '#CC0052', '#00B3B3', '#BF77F6', '#00AAFF'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var paperoverallTrendPDF;

    function paperoverallTrend(lucifer, namesd) {
        paperoverallTrendPDF = new Highcharts.Chart('paperoverall_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {
                enabled: false,
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return Math.round(this.y);
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#004D99', '#004D99', '#CC0052', '#00B3B3', '#BF77F6', '#00AAFF'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var papertimeTrendPDF;

    function papertimeTrend(lucifer, namesd) {
        papertimeTrendPDF = new Highcharts.Chart('papertime_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {

                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#004D99', '#004D99', '#CC0052', '#00B3B3', '#BF77F6', '#00AAFF'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var paperprocessTrendPDF;

    function paperprocessTrend(lucifer, namesd) {
        paperprocessTrendPDF = new Highcharts.Chart('paperprocess_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {

                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#004D99', '#004D99', '#CC0052', '#00B3B3', '#BF77F6', '#00AAFF'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var paperdiagnosTrendPDF;

    function paperdiagnosTrend(lucifer, namesd) {
        paperdiagnosTrendPDF = new Highcharts.Chart('paperdiagnos_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {

                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#004D99', '#004D99', '#CC0052', '#00B3B3', '#BF77F6', '#00AAFF'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var deliveryoverallTrendPDF;

    function deliveryoverallTrend(lucifer, namesd) {
        deliveryoverallTrendPDF = new Highcharts.Chart('deliveryoverall_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {
                enabled: false,
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return Math.round(this.y);
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#004D99', '#004D99', '#CC0052', '#00B3B3', '#BF77F6', '#00AAFF'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }
    //debugger;

    var deliverycondTrendPDF;

    function deliverycondTrend(lucifer, namesd) {
        deliverycondTrendPDF = new Highcharts.Chart('deliverycond_trends', {
            chart: {
                "backgroundColor": "white",

                height: 350
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {

                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return this.y + "%";
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#004D99', '#004D99', '#CC0052', '#00B3B3', '#BF77F6', '#00AAFF'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var deliveryqualityTrendPDF;

    function deliveryqualityTrend(lucifer, namesd) {
        deliveryqualityTrendPDF = new Highcharts.Chart('deliveryquality_trends', {
            chart: {
                "backgroundColor": "white",

                height: 350
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {

                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return (this.y) + '%';
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#004D99', '#004D99', '#CC0052', '#00B3B3', '#BF77F6', '#00AAFF'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var deliverytimeTrendPDF;

    function deliverytimeTrend(lucifer, namesd) {
        deliverytimeTrendPDF = new Highcharts.Chart('deliverytime_trends', {
            chart: {
                "backgroundColor": "white",

                height: 350
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {

                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return (this.y) + '%';
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#004D99', '#004D99', '#CC0052', '#00B3B3', '#BF77F6', '#00AAFF'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var deliveryserviceTrendPDF;

    function deliveryserviceTrend(lucifer, namesd) {
        deliveryserviceTrendPDF = new Highcharts.Chart('deliveryservice_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {
                enabled: false,
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#004D99', '#004D99', '#CC0052', '#00B3B3', '#BF77F6', '#00AAFF'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var deliverydiagnosTrendPDF;

    function deliverydiagnosTrend(lucifer, namesd) {
        deliverydiagnosTrendPDF = new Highcharts.Chart('deliverydiagnos_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {

                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#004D99', '#004D99', '#CC0052', '#00B3B3', '#BF77F6', '#00AAFF'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var deliveryserviceTrendPDF;

    function deliveryserviceTrend(lucifer, namesd) {
        deliveryserviceTrendPDF = new Highcharts.Chart('deliveryservice_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {
                enabled: false,
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#004D99', '#004D99', '#CC0052', '#00B3B3', '#BF77F6', '#00AAFF'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var heartTrendPDF;

    function heartTrend(lucifer, namesd) {
        heartTrendPDF = new Highcharts.Chart('heart_trends', {
            chart: {
                "backgroundColor": "white",

                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {

                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return Math.round(this.y);
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#004D99', '#004D99', '#CC0052', '#00B3B3', '#BF77F6', '#00AAFF'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var SsiperformanceTrendsPDF2;

    function SsiperformanceTrends2(lucifer, namesD) {
        SsiperformanceTrendsPDF2 = new Highcharts.Chart('ssiperformance_trends2', {
            chart: {
                "backgroundColor": "transparent",
                height: 225,
                type: 'column',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: timeText,
                labels: {
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 100,
                max: 1500,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}</b> <br/>',
                shared: true
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y);
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#004D99'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    var hyundaiNpsTrendsPDF2;

    function hyundaiNpsTrends2(lucifer) {
        hyundaiNpsTrendsPDF2 = new Highcharts.Chart('q5_trends2', {
            chart: {
                "backgroundColor": "transparent",
                height: 225,
                type: 'column',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: timeText,
                labels: {
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 150,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}%</b> <br/>',
                shared: true
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#CC0052'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    var hyundaiPreferenceTrendsPDF2;

    function hyundaiPreferenceTrends2(lucifer) {
        hyundaiPreferenceTrendsPDF2 = new Highcharts.Chart('q4_trends2', {
            chart: {
                "backgroundColor": "transparent",
                height: 225,
                type: 'column',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: timeText,
                labels: {
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 150,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}%</b> <br/>',
                shared: true
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#00AAFF'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    var dealerNpsTrendsPDF2;

    function dealerNpsTrends2(lucifer, namesD) {
        dealerNpsTrendsPDF2 = new Highcharts.Chart('q9_trends2', {
            chart: {
                "backgroundColor": "transparent",
                height: 225,
                type: 'column',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: timeText,
                labels: {
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 150,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}%</b> <br/>',
                shared: true
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#00B3B3'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    var dealerpreferenceTrendsPDF2;

    function dealerpreferenceTrends2(lucifer, namesD) {
        dealerpreferenceTrendsPDF2 = new Highcharts.Chart('q8_trends2', {
            chart: {
                "backgroundColor": "transparent",
                height: 225,
                type: 'column',

            },
            title: {
                text: ``,
                margin: -5,
                style: {
                    color: '#FFFFFF',
                    fontSize: '13px'
                }
            },
            credits: {
                enabled: false
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            xAxis: {
                categories: timeText,
                labels: {
                    style: {
                        color: '#000000',
                        fontWeight: 'bold',
                        textOverflow: 'none', //I changed these two lines
                        whiteSpace: 'nowrap',

                    }
                }
            },
            yAxis: {
                min: 0,
                max: 150,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                pointFormat: '<span style="color:{series.color}"></span>: <b>{point.y:.0f}%</b> <br/>',
                shared: true
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },

                series: {
                    cursor: 'pointer',
                    colorByPoint: true,
                    colors: ['#BF77F6'],

                }
            },
            series: [{
                showInLegend: false,
                data: lucifer,
            }]
        });
    }

    var zonalssiChartTrendsPDF2;

    function zonalssiChartTrends2(lucifer, namesD) {
        zonalssiChartTrendsPDF2 = new Highcharts.Chart('zonessi_trends2', {
            chart: {
                type: 'column',
                height: 230
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                max: 1500,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: ''
            },
            plotOptions: {
                column: {
                    pointPadding: 0.3,
                    borderWidth: 0,
                    dataLabels: {
                        formatter: function() {
                            return (this.y);
                        },
                        enabled: true
                    }
                },
            },

            credits: {
                enabled: false
            },

            series: lucifer
        });
    }

    var zonalnpsChartTrendsPDF2;

    function zonalnpsChartTrends2(lucifer, namesD) {
        zonalnpsChartTrendsPDF2 = new Highcharts.Chart('zonenps_trends2', {
            chart: {
                type: 'column',
                height: 230
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                max: 150,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: '%'
            },
            plotOptions: {
                column: {
                    pointPadding: 0.3,
                    borderWidth: 0,
                    dataLabels: {
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },
            },

            credits: {
                enabled: false
            },

            series: lucifer
        });
    }

    var regionnpsChartTrendsPDF2;

    function regionnpsChartTrends2(lucifer, namesD) {
        regionnpsChartTrendsPDF2 = new Highcharts.Chart('regionnps_trends2', {
            chart: {
                type: 'column',
                height: 230
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                max: 150,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: '%'
            },
            plotOptions: {
                column: {
                    pointPadding: 0.3,
                    borderWidth: 0,
                    dataLabels: {
                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },
            },

            credits: {
                enabled: false
            },

            series: lucifer
        });
    }

    var regionssiChartTrendsPDF2;

    function regionssiChartTrends2(lucifer, namesD) {
        regionssiChartTrendsPDF2 = new Highcharts.Chart('regionssi_trends2', {
            chart: {
                type: 'column',
                height: 230
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                max: 1500,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: ''
            },
            plotOptions: {
                column: {
                    pointPadding: 0.3,
                    borderWidth: 0,
                    dataLabels: {
                        formatter: function() {
                            return (this.y);
                        },
                        enabled: true
                    }
                },
            },

            credits: {
                enabled: false
            },

            series: lucifer
        });
    }

    var hyundaiwebsiteTrendsPDF2;

    function hyundaiwebsiteTrend2(lucifer, namesD) {
        Highcharts.chart('hyundaiwebsite_trends2', {
            chart: {
                type: 'column',
                height: 310,
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                max: 150,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: '%'
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },
            },

            credits: {
                enabled: false
            },

            series: lucifer
        });
    }

    var ctbwebsiteTrendsPDF2;

    function ctbwebsiteTrend2(lucifer, namesD) {
        Highcharts.chart('ctbwebsite_trends2', {
            chart: {
                type: 'column',
                height: 230,
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                max: 150,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: '%'
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },
            },

            credits: {
                enabled: false
            },

            series: lucifer
        });
    }

    var factorTrendPDF2;

    function factorTrend2(lucifer) {
        Highcharts.chart('factor_trends2', {
            chart: {
                type: 'column',
                height: 190,
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                min: 100,
                max: 1500,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: ''
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y);
                        },
                        enabled: true
                    }
                },
            },

            credits: {
                enabled: false
            },

            series: lucifer
        });
    }

    var dizioverallTrend2PDF2;

    function dizioverallTrend2(lucifer) {
        Highcharts.chart('overallhyundaiwebsite_trends2', {
            chart: {
                type: 'column',
                height: 310
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            legend: {
                enabled: false,
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                min: 100,
                max: 1500,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: ''
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y);
                        },
                        enabled: true
                    }
                },
            },

            credits: {
                enabled: false
            },

            series: lucifer
        });
    }

    var facilityoverallTrendPDF2;

    function facilityoverallTrend2(lucifer, namesD) {
        Highcharts.chart('facilityoverall_trends2', {
            chart: {
                type: 'column',
                height: 290
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                max: 1500,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: ''
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y);
                        },
                        enabled: true
                    }
                },
            },

            legend: {
                enabled: false,
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            credits: {
                enabled: false
            },

            series: lucifer
        });
    }

    var facilityQ17bTrendPDF2;

    function facilityQ17b2(lucifer, namesD) {
        Highcharts.chart('facilityoverall_trends2_2', {
            chart: {
                type: 'column',
                height: 290
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                max: 150,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: ''
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return this.y + "%";
                        },
                        enabled: true
                    }
                },
            },

            legend: {
                enabled: false,
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            credits: {
                enabled: false
            },

            series: lucifer
        });
    }
    var facilityTrendPDF2;

    function facilityTrend2(lucifer, namesD) {
        Highcharts.chart('facility_trends2', {
            chart: {
                type: 'column',
                height: 290
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                max: 150,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: '%'
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },
            },

            credits: {
                enabled: false
            },

            series: lucifer
        });
    }

    var salesoverallTrendPDF2;

    function salesoverallTrend2(lucifer, namesD) {
        Highcharts.chart('salesoverall_trends2', {
            chart: {
                type: 'column',
                height: 290
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                max: 1500,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: ''
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y);
                        },
                        enabled: true
                    }
                },
            },
            legend: {
                enabled: false,
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            credits: {
                enabled: false
            },

            series: lucifer
        });
    }


    var Q19e2OTrendPDF2;

    function Q19e2OTrend2(lucifer, namesD) {
        Highcharts.chart('democar_trends2', {
            chart: {
                type: 'column',
                height: 290
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                max: 150,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: ''
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y);
                        },
                        enabled: true
                    }
                },
            },
            legend: {
                enabled: false,
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            credits: {
                enabled: false
            },

            series: lucifer
        });
    }



    var Q19TrendPDF2;

    function Q19Trend2(lucifer, namesD) {
        Highcharts.chart('q19_trends2', {
            chart: {
                type: 'column',
                height: 290
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                max: 150,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: ''
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y);
                        },
                        enabled: true
                    }
                },
            },
            legend: {
                enabled: false,
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            credits: {
                enabled: false
            },

            series: lucifer
        });
    }

    var salesyesTrendPDF2;

    function salesyesTrend2(lucifer, namesD) {
        Highcharts.chart('salesyes_trends2', {
            chart: {
                type: 'column',
                height: 290
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                max: 150,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: '%'
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },
            },

            credits: {
                enabled: false
            },

            series: lucifer
        });
    }

    var salesnoTrendPDF2;

    function salesnoTrend2(lucifer, namesD) {
        Highcharts.chart('salesno_trends2', {
            chart: {
                type: 'column',
                height: 290
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                max: 150,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: '%'
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },
            },

            credits: {
                enabled: false
            },

            series: lucifer
        });
    }

    var driveexpTrendPDF2;

    function driveexpTrend2(lucifer, namesD) {
        Highcharts.chart('driveexp_trends2', {
            chart: {
                type: 'column',
                height: 290
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                max: 150,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: '%'
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },
            },

            credits: {
                enabled: false
            },

            series: lucifer
        });
    }

    var drivedealerTrendPDF2;

    function drivedealerTrend2(lucifer, namesD) {
        Highcharts.chart('drivedealer_trends2', {
            chart: {
                type: 'column',
                height: 290
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                max: 150,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: '%'
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },
            },

            credits: {
                enabled: false
            },

            series: lucifer
        });
    }

    var drivereasonTrendPDF2;

    function drivereasonTrend2(lucifer, namesD) {
        Highcharts.chart('drivereason_trends2', {
            chart: {
                type: 'column',
                height: 290
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                max: 150,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: '%'
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },
            },

            credits: {
                enabled: false
            },

            series: lucifer
        });
    }

    var dealoverallTrendPDF2;

    function dealoverallTrend2(lucifer, namesD) {
        Highcharts.chart('dealoverall_trends2', {
            chart: {
                type: 'column',
                height: 290
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                max: 1500,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: ''
            },
            legend: {
                enabled: false,
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y);
                        },
                        enabled: true
                    }
                },
            },

            credits: {
                enabled: false
            },

            series: lucifer
        });
    }


    var q24TrendPDF2;

    function q24Trend2(lucifer, namesD) {
        Highcharts.chart('q24_trends2', {
            chart: {
                type: 'column',
                height: 290
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                max: 150,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: ''
            },
            legend: {
                enabled: false,
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y) + "%";
                        },
                        enabled: true
                    }
                },
            },

            credits: {
                enabled: false
            },

            series: lucifer
        });
    }


    var paperq26NTrendPDF2;

    function paperq26NTrend2(lucifer, namesD) {
        Highcharts.chart('paperexp_trends2', {
            chart: {
                type: 'column',
                height: 290
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                max: 150,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: ''
            },
            legend: {
                enabled: false,
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y) + "%";
                        },
                        enabled: true
                    }
                },
            },

            credits: {
                enabled: false
            },

            series: lucifer
        });
    }


    var q27TrendPDF2;

    function q27Trend2(lucifer, namesD) {
        Highcharts.chart('deliverynew_trends2', {
            chart: {
                type: 'column',
                height: 290
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                max: 150,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: ''
            },
            legend: {
                enabled: false,
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y) + "%";
                        },
                        enabled: true
                    }
                },
            },

            credits: {
                enabled: false
            },

            series: lucifer
        });
    }

    var dealTrendPDF2;

    function dealTrend2(lucifer, namesD) {
        Highcharts.chart('deal_trends2', {
            chart: {
                type: 'column',
                height: 290
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                max: 150,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: '%'
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },
            },

            credits: {
                enabled: false
            },

            series: lucifer
        });
    }

    var paperoverallTrendPDF2;

    function paperoverallTrend2(lucifer, namesD) {
        Highcharts.chart('paperoverall_trends2', {
            chart: {
                type: 'column',
                height: 290
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            legend: {
                enabled: false,
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            yAxis: {
                min: 0,
                max: 1500,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: ''
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y);
                        },
                        enabled: true
                    }
                },
            },

            credits: {
                enabled: false
            },

            series: lucifer
        });
    }

    var papertimeTrendPDF2;

    function papertimeTrend2(lucifer, namesD) {
        Highcharts.chart('papertime_trends2', {
            chart: {
                type: 'column',
                height: 290
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                max: 150,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: '%'
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },
            },

            credits: {
                enabled: false
            },

            series: lucifer
        });
    }

    var paperprocessTrendPDF2;

    function paperprocessTrend2(lucifer, namesD) {
        Highcharts.chart('paperprocess_trends2', {
            chart: {
                type: 'column',
                height: 290
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                max: 150,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: '%'
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },
            },

            credits: {
                enabled: false
            },

            series: lucifer
        });
    }

    var paperdiagnosTrendPDF2;

    function paperdiagnosTrend2(lucifer, namesD) {
        Highcharts.chart('paperdiagnos_trends2', {
            chart: {
                type: 'column',
                height: 290
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                max: 150,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: '%'
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },
            },

            credits: {
                enabled: false
            },

            series: lucifer
        });
    }

    var deliverycondTrendPDF2;

    function deliverycondTrend2(lucifer, namesD) {
        Highcharts.chart('deliverycond_trends2', {
            chart: {
                type: 'column',
                height: 290
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                max: 150,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: '%'
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y) + '%';;
                        },
                        enabled: true
                    }
                },
            },

            credits: {
                enabled: false
            },

            series: lucifer
        });
    }

    var deliveryoverallTrendPDF2;

    function deliveryoverallTrend2(lucifer, namesD) {
        Highcharts.chart('deliveryoverall_trends2', {
            chart: {
                type: 'column',
                height: 230
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                max: 1500,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: ''
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y);
                        },
                        enabled: true
                    }
                },
            },
            legend: {
                enabled: false,
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            credits: {
                enabled: false
            },

            series: lucifer
        });
    }

    var deliveryqualityTrendPDF2;

    function deliveryqualityTrend2(lucifer, namesD) {
        Highcharts.chart('deliveryquality_trends2', {
            chart: {
                type: 'column',
                height: 290
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                max: 150,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: '%'
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y) + '%';;
                        },
                        enabled: true
                    }
                },
            },

            credits: {
                enabled: false
            },

            series: lucifer
        });
    }

    var deliverytimeTrendPDF2;

    function deliverytimeTrend2(lucifer, namesD) {
        Highcharts.chart('deliverytime_trends2', {
            chart: {
                type: 'column',
                height: 290
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                max: 150,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: '%'
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y) + '%';;
                        },
                        enabled: true
                    }
                },
            },

            credits: {
                enabled: false
            },

            series: lucifer
        });
    }

    var deliveryserviceTrendPDF2;

    function deliveryserviceTrend2(lucifer, namesD) {
        Highcharts.chart('deliveryservice_trends2', {
            chart: {
                type: 'column',
                height: 290
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                max: 150,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: '%'
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },
            },

            credits: {
                enabled: false
            },

            series: lucifer
        });
    }

    var deliverydiagnosTrendPDF2;

    function deliverydiagnosTrend2(lucifer, namesD) {
        Highcharts.chart('deliverydiagnos_trends2', {
            chart: {
                type: 'column',
                height: 290
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                max: 150,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: '%'
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y).toFixed(1) + '%';;
                        },
                        enabled: true
                    }
                },
            },

            credits: {
                enabled: false
            },

            series: lucifer
        });
    }

    var heartTrendPDF2;

    function heartTrend2(lucifer, namesD) {
        Highcharts.chart('heart_trends2', {
            chart: {
                type: 'column',
                height: 290
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: timeText,
                title: {
                    text: null
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                min: 0,
                max: 1500,
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            tooltip: {
                valueSuffix: ''
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0,
                    dataLabels: {

                        formatter: function() {
                            return (this.y);
                        },
                        enabled: true
                    }
                },
            },

            credits: {
                enabled: false
            },

            series: lucifer
        });
    }









    var overallfactorTrendsPDF;

    function overallfactorTrends(lucifer, namesd) {
        overallfactorTrendsPDF = new Highcharts.Chart('overallfactor', {
            chart: {
                "backgroundColor": "white",
                width: 900,
                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return Math.round(this.y);
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#35b997', '#e20000', '#FEF302', '#910000', '#1aadce', '#39FF14', '#f28f43', '#EC407A'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var factorTrendsPDF;

    function factorTrends(lucifer, namesd) {
        factorTrendsPDF = new Highcharts.Chart('factortrend', {
            chart: {
                "backgroundColor": "white",
                width: 900,
                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return Math.round(this.y);
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#35b997', '#e20000', '#FEF302', '#910000', '#1aadce', '#39FF14', '#f28f43', '#EC407A'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var factorattTrendsPDF;

    function factorattTrends(lucifer, namesd) {
        factorattTrendsPDF = new Highcharts.Chart('factorattribute', {
            chart: {
                "backgroundColor": "white",
                width: 900,
                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return Math.round(this.y);
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#35b997', '#e20000', '#FEF302', '#910000', '#1aadce', '#39FF14', '#f28f43', '#EC407A'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var sopTrendsPDF;

    function sopTrends(lucifer, namesd) {
        sopTrendsPDF = new Highcharts.Chart('soptrend', {
            chart: {
                "backgroundColor": "white",
                width: 900,
                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return Math.round(this.y);
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#35b997', '#e20000', '#FEF302', '#910000', '#1aadce', '#39FF14', '#f28f43', '#EC407A'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }

    var sopfacilityTrendsPDF;

    function sopfacilityTrends(lucifer, namesd) {
        sopfacilityTrendsPDF = new Highcharts.Chart('sopfacilitytrend', {
            chart: {
                "backgroundColor": "white",
                width: 900,
                height: 230
            },
            title: {
                text: '',
                style: {
                    color: '#fff',
                    font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
                }
            },
            navigation: {
                buttonOptions: {
                    enabled: false
                }
            },
            yAxis: {
                title: {
                    text: ''
                },
                gridLineWidth: 0,
                minorGridLineWidth: 0,
                alignTicks: false,
                labels: {
                    enabled: false
                }
            },
            credits: {
                enabled: false
            },
            legend: {
                layout: 'horizontal',
                align: 'center',
                verticalAlign: 'bottom',
                backgroundColor: Highcharts.defaultOptions.legend.backgroundColor || // theme
                    '#fff'
            },
            xAxis: {
                labels: {
                    style: {
                        color: '#000000',
                    }
                },
                categories: timeText
            },
            plotOptions: {
                series: {
                    stacking: 'normal',
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        formatter: function() {
                            return Math.round(this.y);
                        },
                    },
                    label: {
                        connectorAllowed: false
                    },
                }
            },
            colors: ['#35b997', '#e20000', '#FEF302', '#910000', '#1aadce', '#39FF14', '#f28f43', '#EC407A'],
            series: lucifer,
            responsive: {
                rules: [{
                    condition: {
                        maxWidth: 500
                    },
                    chartOptions: {
                        legend: {
                            layout: 'horizontal',
                            align: 'center',
                            verticalAlign: 'bottom'
                        }
                    }
                }]
            }
        });
    }
    //=================================Chart Start============================================
    //=================================Export============================================
    function exportPpt() {
        // alert("hii");
        //alert(cat2);
        //alert(val2);
        //alert(benchindianpsPPT);
        //alert(tabsName);
        var addText = $(".paraX").val();
        console.log(addText);

        var data;
        if (conX == 1) {
            data = datafortable;
            console.log(data);
        } else {
            data = datafortable2;
            console.log(data);
        }

        //////debugger;
        let pptx = new PptxGenJS();
        let slideoverallSSI;
        let graphoverallSSI;

        let slidehyundaiNPS;
        let graphhyundaiNPS;

        let slidedealerNPS;
        let graphdealerNPS;

        let slidedealerPreference;
        let graphdealerPreference;

        let slidehyundaiPreference;
        let graphhyundaiPreference;

        let slidefactorDizitization;
        let graphfactorDizitization;

        let slidefactorFacility;
        let graphfactorFacility;

        let slidefactorSalesconsultant;
        let graphfactorSalesconsultant;

        let slidefactorDeal;
        let graphfactorDeal;

        let slidefactorPaperwork;
        let graphfactorPaperwork;

        let slidefactorDelivery;
        let graphfactorDelivery;

        let slidehyundaiweb1;
        let graphhyundaiweb1;

        let slidehyundaiweb2;
        let graphhyundaiweb2;

        let slidehyundaiweb3;
        let graphhyundaiweb3;

        let slidehyundaiweb4;
        let graphhyundaiweb4;

        let slidehyundaiweb5;
        let graphhyundaiweb5;

        let slidectbweb1;
        let graphctbweb1;

        let slidectbweb2;
        let graphctbweb2;

        let slidectbweb3;
        let graphctbweb3;

        let slidectbweb4;
        let graphctbweb4;

        let slidectbweb5;
        let graphctbweb5;

        let slidefacility1;
        let graphfacility1;

        let slidefacility2;
        let graphfacility2;

        let slidefacility3;
        let graphfacility3;

        let slidefacility4;
        let graphfacility4;

        let slidefacility5;
        let graphfacility5;

        let slidesc1;
        let graphsc1;

        let slidesc2;
        let graphsc2;

        let slidesc3;
        let graphsc3;

        let slidesc4;
        let graphsc4;

        //for first chart start

        let opts = {
            x: 1.2,
            y: 1.5,
            w: '100%',
            h: 0.5,
            fontSize: 14,
            color: '000000'
        };

        let opts1_1 = {
            x: 1.8,
            y: 1.5,
            w: '100%',
            h: 0.5,
            fontSize: 14,
            color: '000000'
        };
        let opts1_2 = {
            x: 1.2,
            y: 1.5,
            w: '100%',
            h: 0.5,
            fontSize: 10,
            color: '000000'
        };

        let opts2 = {
            x: 2.0,
            y: 2.3,
            w: '100%',
            h: 0.5,
            fontSize: 15,
            color: '000000'
        };
        let optsChartPie1 = {
            x: 1.5,
            y: 1.8,
            w: 1.5,
            h: 1.5,
            chartColors: ["004D99", "E3E3E3"],
            dataBorder: {
                pt: "2",
                color: "F1F1F1"
            },
            dataLabelColor: "000000",
            dataLabelFontSize: 14,

            legendPos: "r",

            showLabel: false,
            showValue: false,
            showPercent: false,
            showLegend: false,
            showTitle: false,

            holeSize: 80,

            title: "Project Status",
            titleColor: "33CF22",
            titleFontFace: "Helvetica Neue",
            titleFontSize: 24,
        };

        //for first chart end

        //for second chart start

        let opts3 = {
            x: 4.3,
            y: 1.5,
            w: '100%',
            h: 0.5,
            fontSize: 14,
            color: '000000'
        };
        let opts4 = {
            x: 4.8,
            y: 2.3,
            w: '100%',
            h: 0.5,
            fontSize: 15,
            color: '000000'
        };

        let opts3_1 = {
            x: 5.2,
            y: 1.5,
            w: '100%',
            h: 0.5,
            fontSize: 10,
            color: '000000'
        };
        let opts4_1 = {
            x: 6.2,
            y: 2.3,
            w: '100%',
            h: 0.5,
            fontSize: 15,
            color: '000000'
        };

        let optsChartPie2 = {
            x: 4.3,
            y: 1.8,
            w: 1.5,
            h: 1.5,
            chartColors: ["004D99", "E3E3E3"],
            dataBorder: {
                pt: "2",
                color: "F1F1F1"
            },
            dataLabelColor: "000000",
            dataLabelFontSize: 14,

            legendPos: "r",

            showLabel: false,
            showValue: false,
            showPercent: false,
            showLegend: false,
            showTitle: false,

            holeSize: 80,

            title: "Project Status",
            titleColor: "33CF22",
            titleFontFace: "Helvetica Neue",
            titleFontSize: 24,
        };

        let optsChartPie2_1 = {
            x: 5.7,
            y: 1.8,
            w: 1.5,
            h: 1.5,
            chartColors: ["004D99", "E3E3E3"],
            dataBorder: {
                pt: "2",
                color: "F1F1F1"
            },
            dataLabelColor: "000000",
            dataLabelFontSize: 14,

            legendPos: "r",

            showLabel: false,
            showValue: false,
            showPercent: false,
            showLegend: false,
            showTitle: false,

            holeSize: 80,

            title: "Project Status",
            titleColor: "33CF22",
            titleFontFace: "Helvetica Neue",
            titleFontSize: 24,
        };

        let optsChartPie2_1R = {
            x: 5.7,
            y: 1.8,
            w: 1.5,
            h: 1.5,
            chartColors: ["FF9900", "E3E3E3"],
            dataBorder: {
                pt: "2",
                color: "F1F1F1"
            },
            dataLabelColor: "000000",
            dataLabelFontSize: 14,

            legendPos: "r",

            showLabel: false,
            showValue: false,
            showPercent: false,
            showLegend: false,
            showTitle: false,

            holeSize: 80,

            title: "Project Status",
            titleColor: "33CF22",
            titleFontFace: "Helvetica Neue",
            titleFontSize: 24,
        };


        //for second chart end

        //for third chart start

        let opts5 = {
            x: 7.1,
            y: 1.5,
            w: '100%',
            h: 0.5,
            fontSize: 14,
            color: '000000'
        };
        let opts6 = {
            x: 7.5,
            y: 2.3,
            w: '100%',
            h: 0.5,
            fontSize: 15,
            color: '000000'
        };

        let optsChartPie3 = {
            x: 7.0,
            y: 1.8,
            w: 1.5,
            h: 1.5,
            chartColors: ["004D99", "E3E3E3"],
            dataBorder: {
                pt: "2",
                color: "F1F1F1"
            },
            dataLabelColor: "000000",
            dataLabelFontSize: 14,

            legendPos: "r",

            showLabel: false,
            showValue: false,
            showPercent: false,
            showLegend: false,
            showTitle: false,

            holeSize: 80,

            title: "Project Status",
            titleColor: "33CF22",
            titleFontFace: "Helvetica Neue",
            titleFontSize: 24,
        };


        //for third chart end

        //for forth chart start

        let opts7 = {
            x: 1.5,
            y: 3.5,
            w: '100%',
            h: 0.5,
            fontSize: 14,
            color: '000000'
        };

        let opts7_1 = {
            x: 1.8,
            y: 3.5,
            w: '100%',
            h: 0.5,
            fontSize: 14,
            color: '000000'
        };
        let opts8 = {
            x: 2.0,
            y: 4.5,
            w: '100%',
            h: 0.5,
            fontSize: 15,
            color: '000000'
        };
        let optsChartPie4 = {
            x: 1.5,
            y: 4.0,
            w: 1.5,
            h: 1.5,
            chartColors: ["004D99", "E3E3E3"],
            dataBorder: {
                pt: "2",
                color: "F1F1F1"
            },
            dataLabelColor: "000000",
            dataLabelFontSize: 14,

            legendPos: "r",

            showLabel: false,
            showValue: false,
            showPercent: false,
            showLegend: false,
            showTitle: false,

            holeSize: 80,

            title: "Project Status",
            titleColor: "33CF22",
            titleFontFace: "Helvetica Neue",
            titleFontSize: 24,
        };

        let optsChartPie4R = {
            x: 1.5,
            y: 4.0,
            w: 1.5,
            h: 1.5,
            chartColors: ["FF9900", "E3E3E3"],
            dataBorder: {
                pt: "2",
                color: "F1F1F1"
            },
            dataLabelColor: "000000",
            dataLabelFontSize: 14,

            legendPos: "r",

            showLabel: false,
            showValue: false,
            showPercent: false,
            showLegend: false,
            showTitle: false,

            holeSize: 80,

            title: "Project Status",
            titleColor: "33CF22",
            titleFontFace: "Helvetica Neue",
            titleFontSize: 24,
        };

        //for forth chart end

        //for fifth chart start

        let opts9 = {
            x: 5.0,
            y: 3.5,
            w: '100%',
            h: 0.5,
            fontSize: 14,
            color: '000000'
        };
        let opts9_1 = {
            x: 4.3,
            y: 3.5,
            w: '100%',
            h: 0.5,
            fontSize: 14,
            color: '000000'
        };
        let opts10 = {
            x: 6.4,
            y: 4.5,
            w: '100%',
            h: 0.5,
            fontSize: 15,
            color: '000000'
        };
        let opts10_1 = {
            x: 4.8,
            y: 4.5,
            w: '100%',
            h: 0.5,
            fontSize: 15,
            color: '000000'
        };
        let optsChartPie5 = {
            x: 6.0,
            y: 4.0,
            w: 1.5,
            h: 1.5,
            chartColors: ["004D99", "E3E3E3"],
            dataBorder: {
                pt: "2",
                color: "F1F1F1"
            },
            dataLabelColor: "000000",
            dataLabelFontSize: 14,

            legendPos: "r",

            showLabel: false,
            showValue: false,
            showPercent: false,
            showLegend: false,
            showTitle: false,

            holeSize: 80,

            title: "Project Status",
            titleColor: "33CF22",
            titleFontFace: "Helvetica Neue",
            titleFontSize: 24,
        };

        let optsChartPie5_1 = {
            x: 4.3,
            y: 4.0,
            w: 1.5,
            h: 1.5,
            chartColors: ["004D99", "E3E3E3"],
            dataBorder: {
                pt: "2",
                color: "F1F1F1"
            },
            dataLabelColor: "000000",
            dataLabelFontSize: 14,

            legendPos: "r",

            showLabel: false,
            showValue: false,
            showPercent: false,
            showLegend: false,
            showTitle: false,

            holeSize: 80,

            title: "Project Status",
            titleColor: "33CF22",
            titleFontFace: "Helvetica Neue",
            titleFontSize: 24,
        };

        let optsChartPie5_1R = {
            x: 4.3,
            y: 4.0,
            w: 1.5,
            h: 1.5,
            chartColors: ["FF9900", "E3E3E3"],
            dataBorder: {
                pt: "2",
                color: "F1F1F1"
            },
            dataLabelColor: "000000",
            dataLabelFontSize: 14,

            legendPos: "r",

            showLabel: false,
            showValue: false,
            showPercent: false,
            showLegend: false,
            showTitle: false,

            holeSize: 80,

            title: "Project Status",
            titleColor: "33CF22",
            titleFontFace: "Helvetica Neue",
            titleFontSize: 24,
        };

        //for fifth chart end


        //for six chart start

        let opts11 = {
            x: 7.1,
            y: 3.5,
            w: '100%',
            h: 0.5,
            fontSize: 14,
            color: '000000'
        };
        let opts12 = {
            x: 7.5,
            y: 4.5,
            w: '100%',
            h: 0.5,
            fontSize: 15,
            color: '000000'
        };

        let optsChartPie6 = {
            x: 7.0,
            y: 4.0,
            w: 1.5,
            h: 1.5,
            chartColors: ["004D99", "E3E3E3"],
            dataBorder: {
                pt: "2",
                color: "F1F1F1"
            },
            dataLabelColor: "000000",
            dataLabelFontSize: 14,

            legendPos: "r",

            showLabel: false,
            showValue: false,
            showPercent: false,
            showLegend: false,
            showTitle: false,

            holeSize: 80,

            title: "Project Status",
            titleColor: "33CF22",
            titleFontFace: "Helvetica Neue",
            titleFontSize: 24,
        };

        let optsChartPie6R = {
            x: 7.0,
            y: 4.0,
            w: 1.5,
            h: 1.5,
            chartColors: ["FF9900", "E3E3E3"],
            dataBorder: {
                pt: "2",
                color: "F1F1F1"
            },
            dataLabelColor: "000000",
            dataLabelFontSize: 14,

            legendPos: "r",

            showLabel: false,
            showValue: false,
            showPercent: false,
            showLegend: false,
            showTitle: false,

            holeSize: 80,

            title: "Project Status",
            titleColor: "33CF22",
            titleFontFace: "Helvetica Neue",
            titleFontSize: 24,
        };


        //for six chart end


        // let optsChartPie3 = {
        // 	x: 5.0,
        // 	y: 1.5,
        // 	w: 2.5,
        // 	h: 2.5,
        // 	chartColors: ["004D99","E3E3E3"],
        // 	dataBorder: { pt: "2", color: "F1F1F1" },
        // 	dataLabelColor: "000000",
        // 	dataLabelFontSize: 14,

        // 	legendPos: "r",

        // 	showLabel: false,
        // 	showValue: false,
        // 	showPercent: false,
        // 	showLegend: false,
        // 	showTitle: false,

        // 	holeSize: 80,

        // 	title: "Project Status",
        // 	titleColor: "33CF22",
        // 	titleFontFace: "Helvetica Neue",
        // 	titleFontSize: 24,
        // };

        // let optsChartPie2 = {
        // 	x: 3.7,
        // 	y: 1.5,
        // 	w: 2.5,
        // 	h: 2.5,
        // 	chartColors: ["FF9900","E3E3E3"],
        // 	dataBorder: { pt: "2", color: "F1F1F1" },
        // 	dataLabelColor: "000000",
        // 	dataLabelFontSize: 14,

        // 	legendPos: "r",

        // 	showLabel: false,
        // 	showValue: false,
        // 	showPercent: false,
        // 	showLegend: false,
        // 	showTitle: false,

        // 	holeSize: 80,

        // 	title: "Project Status",
        // 	titleColor: "33CF22",
        // 	titleFontFace: "Helvetica Neue",
        // 	titleFontSize: 24,
        // };

        slideoverallSSI = pptx.addSlide();
        graphoverallSSI = [{
            name: "SSI",
            labels: ["SSI", "SSI"],
            values: [data[0]['ssi'], 1000 - data[0]['ssi']],
        }];
        slideoverallSSI.addImage({
            x: 0.2,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/Hyundai2.png"
        });
        slideoverallSSI.addImage({
            x: 2.5,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/nlogo.png"
        });
        slideoverallSSI.addText(`Active Tab:Overall Performance`, {
            x: 0.5,
            y: 0.4,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });
        slideoverallSSI.addText(`Applied Filter:${addText}`, {
            x: 0.5,
            y: 0.6,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });
        slideoverallSSI.addText("SSI Performance Index", {
            x: '9%',
            y: 1.5,
            w: '100%',
            h: 0.5,
            fontSize: 14,
            color: '000000'
        });
        slideoverallSSI.addText(`${data[0]['ssi']}`, {
            x: 1.5,
            y: 2.3,
            w: '100%',
            h: 0.5,
            fontSize: 15,
            color: '000000'
        });
        slideoverallSSI.addChart(pptx.charts.DOUGHNUT, graphoverallSSI, {
            x: 1.0,
            y: 1.8,
            w: 1.5,
            h: 1.5,
            chartColors: ["004D99", "E3E3E3"],
            dataBorder: {
                pt: "2",
                color: "F1F1F1"
            },
            dataLabelColor: "000000",
            dataLabelFontSize: 14,
            legendPos: "r",
            showLabel: false,
            showValue: false,
            showPercent: false,
            showLegend: false,
            showTitle: false,
            holeSize: 80,
            title: "Project Status",
            titleColor: "33CF22",
            titleFontFace: "Helvetica Neue",
            titleFontSize: 24,
        });

        slideoverallSSI.addText("Computed Score Out of 1000", {
            x: '12%',
            y: 3.1,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });


        //slidehyundaiNPS = pptx.addSlide();
        <?php if($_SESSION['user_type']==1){
?>

        graphhyundaiNPS = [{
            name: "Hyundai NPS",
            labels: ["Hyundai NPS", "Hyundai NPS"],
            values: [data[0]['Q5_NPS'], 100 - data[0]['Q5_NPS']],
        }];
        slideoverallSSI.addText("Hyundai NPS", {
            x: '40%',
            y: 1.5,
            w: '100%',
            h: 0.5,
            fontSize: 14,
            color: '000000'
        });
        slideoverallSSI.addText(`${data[0]['Q5_NPS']}%`, {
            x: 4.1,
            y: 2.3,
            w: '100%',
            h: 0.5,
            fontSize: 15,
            color: '000000'
        });
        slideoverallSSI.addText(`Promoters:${data[0]['Q5_3']}%`, {
            x: 5.1,
            y: 2.0,
            w: '100%',
            h: 0.5,
            fontSize: 13,
            color: '33CC33'
        });
        slideoverallSSI.addText(`Passive:${data[0]['Q5_2']}%`, {
            x: 5.1,
            y: 2.2,
            w: '100%',
            h: 0.5,
            fontSize: 13,
            color: 'FEDB00'
        });
        slideoverallSSI.addText(`Detractor:${data[0]['Q5_1']}%`, {
            x: 5.1,
            y: 2.4,
            w: '100%',
            h: 0.5,
            fontSize: 13,
            color: 'ff3300'
        });
        //slideoverallSSI.addText(`Base: ${base0}`, { x: 0.5, y: 1.0, w: '100%', h: 6.0, color: "006690",fontSize: 12, bold: true});

        slideoverallSSI.addChart(pptx.charts.DOUGHNUT, graphhyundaiNPS, {
            x: 3.7,
            y: 1.8,
            w: 1.5,
            h: 1.5,
            chartColors: ["004D99", "E3E3E3"],
            dataBorder: {
                pt: "2",
                color: "F1F1F1"
            },
            dataLabelColor: "000000",
            dataLabelFontSize: 14,
            legendPos: "r",
            showLabel: false,
            showValue: false,
            showPercent: false,
            showLegend: false,
            showTitle: false,
            holeSize: 80,
            title: "Project Status",
            titleColor: "33CF22",
            titleFontFace: "Helvetica Neue",
            titleFontSize: 24,
        });
        <?php }	?>
        // slidedealerNPS = pptx.addSlide();
        graphdealerNPS = [{
            name: "Dealer NPS",
            labels: ["Dealer NPS", "Dealer NPS"],
            values: [data[0]['Q9_NPS'], 100 - data[0]['Q9_NPS']],
        }];
        slideoverallSSI.addText("Dealer NPS", {
            x: '68%',
            y: 1.5,
            w: '100%',
            h: 0.5,
            fontSize: 14,
            color: '000000'
        });
        slideoverallSSI.addText(`${data[0]['Q9_NPS']}%`, {
            x: 6.9,
            y: 2.3,
            w: '100%',
            h: 0.5,
            fontSize: 15,
            color: '000000'
        });
        slideoverallSSI.addText(`Promoters:${data[0]['Q9_3']}%`, {
            x: 7.8,
            y: 2.0,
            w: '100%',
            h: 0.5,
            fontSize: 13,
            color: '33CC33'
        });
        slideoverallSSI.addText(`Passive:${data[0]['Q9_2']}%`, {
            x: 7.8,
            y: 2.2,
            w: '100%',
            h: 0.5,
            fontSize: 13,
            color: 'FEDB00'
        });
        slideoverallSSI.addText(`Detractor:${data[0]['Q9_1']}%`, {
            x: 7.8,
            y: 2.4,
            w: '100%',
            h: 0.5,
            fontSize: 13,
            color: 'ff3300'
        });
        //slideoverallSSI.addText(`Base: ${base0}`, { x: 0.5, y: 1.0, w: '100%', h: 6.0, color: "006690",fontSize: 12, bold: true});
        //slideoverallSSI.addText(addText, { x: 0.5, y: 1.5, w: '100%', h: 6.0, color: "006690",fontSize: 12,bold: true });
        slideoverallSSI.addChart(pptx.charts.DOUGHNUT, graphdealerNPS, {
            x: 6.5,
            y: 1.8,
            w: 1.5,
            h: 1.5,
            chartColors: ["004D99", "E3E3E3"],
            dataBorder: {
                pt: "2",
                color: "F1F1F1"
            },
            dataLabelColor: "000000",
            dataLabelFontSize: 14,
            legendPos: "r",
            showLabel: false,
            showValue: false,
            showPercent: false,
            showLegend: false,
            showTitle: false,
            holeSize: 80,
            title: "Project Status",
            titleColor: "33CF22",
            titleFontFace: "Helvetica Neue",
            titleFontSize: 24,
        });


        // slidedealerPreference = pptx.addSlide();
        graphdealerPreference = [{
            name: "Dealer Preference",
            labels: ["Dealer Preference", "Dealer Preference"],
            values: [data[0]['Q8'], 100 - data[0]['Q8']],
        }];



        <?php if($_SESSION['user_type']==1){
?>
        slideoverallSSI.addChart(pptx.charts.DOUGHNUT, graphdealerPreference, optsChartPie4);
        slideoverallSSI.addText("Asked on 10 point scale (Basis 9&10 rating customer)", {
            x: '5.5%',
            y: 5.2,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slideoverallSSI.addText("Dealer Preference", opts7);
        slideoverallSSI.addText(`${data[0]['Q8']}%`, {
            x: 1.9,
            y: 4.5,
            w: '100%',
            h: 0.5,
            fontSize: 15,
            color: '000000'
        });

        slideoverallSSI.addText(`(Count-${data[0]['Q8V']})`, {
            x: '31%',
            y: 5.2,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
		 slideoverallSSI.addText(`(Count is the sample size)`, {
            x: '31%',
            y: 5.3,
            w: '100%',
            h: 0.5,
            fontSize: 6,
            color: '000000'
        });
        <?php
	  } else
	  {
	  ?>

        slideoverallSSI.addChart(pptx.charts.DOUGHNUT, graphdealerPreference, {
            x: 4.0,
            y: 4.0,
            w: 1.5,
            h: 1.5,
            chartColors: ["004D99", "E3E3E3"],
            dataBorder: {
                pt: "2",
                color: "F1F1F1"
            },
            dataLabelColor: "000000",
            dataLabelFontSize: 14,

            legendPos: "r",

            showLabel: false,
            showValue: false,
            showPercent: false,
            showLegend: false,
            showTitle: false,

            holeSize: 80,

            title: "Project Status",
            titleColor: "33CF22",
            titleFontFace: "Helvetica Neue",
            titleFontSize: 24,
        });
        slideoverallSSI.addText("Asked on 10 point scale", {
            x: 4.3,
            y: 5.2,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slideoverallSSI.addText("Dealer Preference", {
            x: 3.7,
            y: 3.5,
            w: '100%',
            h: 0.5,
            fontSize: 14,
            color: '000000'
        });
        slideoverallSSI.addText(`${data[0]['Q8']}%`, {
            x: 4.4,
            y: 4.5,
            w: '100%',
            h: 0.5,
            fontSize: 15,
            color: '000000'
        });
        slideoverallSSI.addText(`(Count-${data[0]['Q8V']})`, {
            x: '57%',
            y: 5.2,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slideoverallSSI.addText(`(Count is the sample size)`, {
            x: '57%',
            y: 5.2,
            w: '100%',
            h: 0.5,
            fontSize: 6,
            color: '000000'
        });

        <?php 
	  }
   if($_SESSION['user_type']==1){
?>
        graphhyundaiPreference = [{
            name: "Hyundai Preference",
            labels: ["Hyundai Preference", "Hyundai Preference"],
            values: [data[0]['Q4'], 100 - data[0]['Q4']],
        }];
        slideoverallSSI.addText("Hyundai Preference", opts9);
        slideoverallSSI.addText(`${data[0]['Q4']}%`, opts10);
        //slideoverallSSI.addText(`Base: ${base0}`, { x: 0.5, y: 1.0, w: '100%', h: 6.0, color: "006690",fontSize: 12, bold: true});
        //slideoverallSSI.addText(addText, { x: 0.5, y: 1.5, w: '100%', h: 6.0, color: "006690",fontSize: 12,bold: true });
        slideoverallSSI.addChart(pptx.charts.DOUGHNUT, graphhyundaiPreference, optsChartPie5);
        slideoverallSSI.addText("Asked on 10 point scale (Basis 9&10 rating customer)", {
            x: '52%',
            y: 5.2,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slideoverallSSI.addText(`(Count-${data[0]['Q4V']})`, {
            x: '76%',
            y: 5.2,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slideoverallSSI.addText(`(Count is the sample size)`, {
            x: '76%',
            y: 5.3,
            w: '100%',
            h: 0.5,
            fontSize: 6,
            color: '000000'
        });
        // slidezonal = pptx.addSlide();
        // graphzonal = zonalSSILuciferPPT;
        // slidezonal.addImage({x: 0.2, y: 0.2, w: '20%', h: 0.2,path: "assets/images/Hyundai2.png"});
        // slidezonal.addImage({x: 2.5, y: 0.2, w: '20%', h: 0.2,path: "assets/images/nlogo.png"});
        // slidezonal.addText(`Active Tab:Overall Performance || Zone Wise Performance`,{ x: 0.5, y: 0.4, w: '100%', h: 0.5, color: "006690",fontSize: 12,bold: true });
        // slidezonal.addText(`Applied Filter:${addText}`,{ x: 0.5, y: 0.6, w: '100%', h: 0.5, color: "006690",fontSize: 12,bold: true });
        // slidezonal.addText("Zonal wise SSI", {x: 0.0,y: 0.25,w: '100%',h: 0.5,align: 'center',fontSize: 14,color: '000000'});
        // slidezonal.addChart(pptx.charts.BAR, graphzonal, { x: 1, y: 1, w: 8, h: 3,chartColors:['FF9900'], valAxisHidden:true, showPercent:true, showPercent: true, showValue: true, valGridLine:{style: 'none'},barDir:'bar',dataLabelFontBold:true,dataLabelFontSize:8,dataLabelColor: "000000"});

        // graphzonal2 = zonalNPSLuciferPPT;
        // slidezonal.addText("Zonal wise SSI", {x: 5.6,y: 0.25,w: '100%',h: 0.5,align: 'center',fontSize: 14,color: '000000'});
        // slidezonal.addChart(pptx.charts.BAR, graphzonal2, { x: 5.6, y: 1, w: 8, h: 3,chartColors:['FF9900'], valAxisHidden:true, showPercent:true, showPercent: true, showValue: true, valGridLine:{style: 'none'},barDir:'bar',dataLabelFontBold:true,dataLabelFontSize:8,dataLabelColor: "000000"});
        <?php }	?>

        slidefactor = pptx.addSlide();
        graphfactorDizitization = [{
            name: "Digitization",
            labels: ["Digitization", "Digitization"],
            values: [data[2]['digiSSI'], 1000 - data[2]['digiSSI']],
        }];
        slidefactor.addImage({
            x: 0.2,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/Hyundai2.png"
        });
        slidefactor.addImage({
            x: 2.5,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/nlogo.png"
        });
        slidefactor.addText(`Active Tab:Factors`, {
            x: 0.5,
            y: 0.4,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });
        slidefactor.addText(`Applied Filter:${addText}`, {
            x: 0.5,
            y: 0.6,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });
        slidefactor.addText("Digitization", opts1_1);
        slidefactor.addText(`${data[2]['digiSSI']}`, opts2);
        slidefactor.addChart(pptx.charts.DOUGHNUT, graphfactorDizitization, optsChartPie1);
        slidefactor.addText("All scores computed out of 1000", {
            x: 1.4,
            y: 3.1,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        graphfactorFacility = [{
            name: "Dealer Facility",
            labels: ["Dealer Facility", "Dealer Facility"],
            values: [data[2]['dfSSI'], 1000 - data[2]['dfSSI']],
        }];
        slidefactor.addText("Dealer Facility", opts3);
        slidefactor.addText(`${data[2]['dfSSI']}`, opts4);
        slidefactor.addChart(pptx.charts.DOUGHNUT, graphfactorFacility, optsChartPie2);
        slidefactor.addText("All scores computed out of 1000", {
            x: 4.3,
            y: 3.1,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        graphfactorSalesconsultant = [{
            name: "Sales Consultant",
            labels: ["Sales Consultant", "Sales Consultant"],
            values: [data[2]['scSSI'], 1000 - data[2]['scSSI']],
        }];
        slidefactor.addText("Sales Consultant", opts5);
        slidefactor.addText(`${data[2]['scSSI']}`, opts6);
        slidefactor.addChart(pptx.charts.DOUGHNUT, graphfactorSalesconsultant, optsChartPie3);
        slidefactor.addText("All scores computed out of 1000", {
            x: 6.9,
            y: 3.1,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        graphfactorDeal = [{
            name: "Deal",
            labels: ["Deal", "Deal"],
            values: [data[2]['dSSI'], 1000 - data[2]['dSSI']],
        }];
        slidefactor.addText("Deal", opts7_1);
        slidefactor.addText(`${data[2]['dSSI']}`, {
            x: 1.9,
            y: 4.5,
            w: '100%',
            h: 0.5,
            fontSize: 15,
            color: '000000'
        });
        slidefactor.addChart(pptx.charts.DOUGHNUT, graphfactorDeal, optsChartPie4);
        slidefactor.addText("All scores computed out of 1000", {
            x: 1.6,
            y: 5.2,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        graphfactorPaperwork = [{
            name: "Paperwork",
            labels: ["Paperwork", "Paperwork"],
            values: [data[2]['paperSSI'], 1000 - data[2]['paperSSI']],
        }];
        slidefactor.addText("Paperwork", {
            x: 4.4,
            y: 3.5,
            w: '100%',
            h: 0.5,
            fontSize: 14,
            color: '000000'
        });
        slidefactor.addText(`${data[2]['paperSSI']}`, opts10_1);
        slidefactor.addChart(pptx.charts.DOUGHNUT, graphfactorPaperwork, optsChartPie5_1);
        slidefactor.addText("All scores computed out of 1000", {
            x: 4.4,
            y: 5.2,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        graphfactorDelivery = [{
            name: "Delivery Process",
            labels: ["Delivery Process", "Delivery Process"],
            values: [data[2]['deSSI'], 1000 - data[2]['deSSI']],
        }];
        slidefactor.addText("Delivery Process", opts11);
        slidefactor.addText(`${data[2]['deSSI']}`, opts12);
        slidefactor.addChart(pptx.charts.DOUGHNUT, graphfactorPaperwork, optsChartPie6);
        slidefactor.addText("All scores computed out of 1000", {
            x: 6.9,
            y: 5.2,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });

        slidehyundaiweb = pptx.addSlide();
        graphhyundaiweb1 = [{
            name: "% visited Hyundai India website before making final purchase",
            labels: ["% visited Hyundai India website before making final purchase",
                "% visited Hyundai India website before making final purchase"
            ],
            values: [data[1]['Q11'], 100 - data[1]['Q11']],
        }];
        slidehyundaiweb.addImage({
            x: 0.2,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/Hyundai2.png"
        });
        slidehyundaiweb.addImage({
            x: 2.5,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/nlogo.png"
        });
        slidehyundaiweb.addText(
            `Active Tab:Factor Deep Dive || Dizitization || Overall Experience on Hyundai India Website`, {
                x: 0.5,
                y: 0.4,
                w: '100%',
                h: 0.5,
                color: "006690",
                fontSize: 12,
                bold: true
            });
        slidehyundaiweb.addText(`Applied Filter:${addText}`, {
            x: 0.5,
            y: 0.6,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });
        slidehyundaiweb.addText("% visited Hyundai India website before making final purchase", {
            x: 0.9,
            y: 1.2,
            w: '100%',
            h: 0.5,
            fontSize: 10,
            color: '000000'
        });
        slidehyundaiweb.addText(`${data[1]['Q11']}%`, {
            x: 1.9,
            y: 2.0,
            w: '100%',
            h: 0.5,
            fontSize: 15,
            color: '000000'
        });
        slidehyundaiweb.addText(`(Count-${data[1]['Q11V']})`, {
            x: '30%',
            y: '48%',
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidehyundaiweb.addText(`(Count is the sample size)`, {
            x: '30%',
            y: '52%',
            w: '100%',
            h: 0.5,
            fontSize: 6,
            color: '000000'
        });
        slidehyundaiweb.addChart(pptx.charts.DOUGHNUT, graphhyundaiweb1, {
            x: 1.5,
            y: 1.5,
            w: 1.5,
            h: 1.5,
            chartColors: ["004D99", "E3E3E3"],
            dataBorder: {
                pt: "2",
                color: "F1F1F1"
            },
            dataLabelColor: "000000",
            dataLabelFontSize: 14,

            legendPos: "r",

            showLabel: false,
            showValue: false,
            showPercent: false,
            showLegend: false,
            showTitle: false,

            holeSize: 80,

            title: "Project Status",
            titleColor: "33CF22",
            titleFontFace: "Helvetica Neue",
            titleFontSize: 24,
        });

        graphhyundaiweb2 = [{
            name: "Digitization(Factor Score)",
            labels: ["Digitization(Factor Score)", "Digitization(Factor Score)"],
            values: [data[2]['digiSSI'], 1000 - data[2]['digiSSI']],
        }];
        slidehyundaiweb.addText("Digitization(Factor Score)", {
            x: 5.5,
            y: 1.2,
            w: '100%',
            h: 0.5,
            fontSize: 10,
            color: '000000'
        });
        slidehyundaiweb.addText(`${data[2]['digiSSI']}`, {
            x: 6.2,
            y: 2.0,
            w: '100%',
            h: 0.5,
            fontSize: 15,
            color: '000000'
        });
        slidehyundaiweb.addChart(pptx.charts.DOUGHNUT, graphhyundaiweb2, {
            x: 5.7,
            y: 1.5,
            w: 1.5,
            h: 1.5,
            chartColors: ["004D99", "E3E3E3"],
            dataBorder: {
                pt: "2",
                color: "F1F1F1"
            },
            dataLabelColor: "000000",
            dataLabelFontSize: 14,

            legendPos: "r",

            showLabel: false,
            showValue: false,
            showPercent: false,
            showLegend: false,
            showTitle: false,

            holeSize: 80,

            title: "Project Status",
            titleColor: "33CF22",
            titleFontFace: "Helvetica Neue",
            titleFontSize: 24,
        });

        graphhyundaiweb3 = [{
            name: "Design and Appearance",
            labels: ["% Dissatisfied", "%satisfied"],
            values: [data[1]['Q12p'], data[1]['Q12O']],
        }];;
        slidehyundaiweb.addText("Design and Appearance", {
            x: 0.4,
            y: 3.1,
            w: '100%',
            h: 0.5,
            fontSize: 10,
            color: '000000'
        });
        slidehyundaiweb.addChart(pptx.charts.BAR, graphhyundaiweb3, {
            x: 0.0,
            y: 3.6,
            w: 3.0,
            h: 1.5,
            chartColors: ['FF9900', '00B050'],
            valAxisHidden: true,
            showPercent: true,
            showPercent: true,
            showValue: true,
            valGridLine: {
                style: 'none'
            },
            barDir: 'bar',
            dataLabelFontBold: true,
            dataLabelFontSize: 8,
            dataLabelColor: "000000",
            dataLabelFormatCode: "#.0"
        });
        slidehyundaiweb.addText(`Satisfied-Rated 9/10(Count-${data[1]['Q12OAN']})`, {
            x: 1.5,
            y: 4.5,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidehyundaiweb.addText(`Dissatisfied-Rated 1-8(Count-${data[1]['Q12pAN']})`, {
            x: 1.5,
            y: 4.6,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidehyundaiweb.addText("Asked to only those who visited Hyundai Website", {
            x: 1.5,
            y: 4.7,
            w: '50%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });

        graphhyundaiweb4 = [{
            name: "Completeness of Vehicle Information & Dealership’s Contact Information",
            labels: ["% Dissatisfied", "%satisfied"],
            values: [data[1]['Q14p'], data[1]['Q14O']],
        }];
        slidehyundaiweb.addText("Completeness of Vehicle Information & Dealership’s Contact Information", {
            x: 2.5,
            y: 3.1,
            w: '100%',
            h: 0.5,
            fontSize: 10,
            color: '000000'
        });
        slidehyundaiweb.addChart(pptx.charts.BAR, graphhyundaiweb4, {
            x: 3.0,
            y: 3.6,
            w: 3.0,
            h: 1.5,
            chartColors: ['FF9900', '00B050'],
            valAxisHidden: true,
            showPercent: true,
            showPercent: true,
            showValue: true,
            valGridLine: {
                style: 'none'
            },
            barDir: 'bar',
            dataLabelFontBold: true,
            dataLabelFontSize: 8,
            dataLabelColor: "000000",
            dataLabelFormatCode: "#.0"
        });
        slidehyundaiweb.addText(`Satisfied-Rated 9/10(Count-${data[1]['Q14OAN']})`, {
            x: 4.5,
            y: 4.5,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidehyundaiweb.addText(`Dissatisfied-Rated 1-8(Count-${data[1]['Q14pAN']})`, {
            x: 4.5,
            y: 4.6,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidehyundaiweb.addText("Asked to only those who visited Hyundai Website", {
            x: 4.5,
            y: 4.7,
            w: '50%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });

        graphhyundaiweb5 = [{
            name: "Ease of Viewing and Navigation",
            labels: ["% Dissatisfied", "%satisfied"],
            values: [data[1]['Q13p'], data[1]['Q13O']],
        }];
        slidehyundaiweb.addText("Ease of Viewing and Navigation", {
            x: 7.0,
            y: 3.1,
            w: '100%',
            h: 0.5,
            fontSize: 10,
            color: '000000'
        });
        slidehyundaiweb.addChart(pptx.charts.BAR, graphhyundaiweb5, {
            x: 6.5,
            y: 3.6,
            w: 3.0,
            h: 1.5,
            chartColors: ['FF9900', '00B050'],
            valAxisHidden: true,
            showPercent: true,
            showPercent: true,
            showValue: true,
            valGridLine: {
                style: 'none'
            },
            barDir: 'bar',
            dataLabelFontBold: true,
            dataLabelFontSize: 8,
            dataLabelColor: "000000",
            dataLabelFormatCode: "#.0"
        });
        slidehyundaiweb.addText(`Satisfied-Rated 9/10(Count-${data[1]['Q13OAN']})`, {
            x: 8.0,
            y: 4.5,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidehyundaiweb.addText(`Dissatisfied-Rated 1-8(Count-${data[1]['Q13pAN']})`, {
            x: 8.0,
            y: 4.6,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidehyundaiweb.addText("Asked to only those who visited Hyundai Website", {
            x: 8.0,
            y: 4.7,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });

        slidectbweb = pptx.addSlide();
        graphctbweb1 = [{
            name: "% informed about availability of CTB",
            labels: ["% informed about availability of CTB", "% informed about availability of CTB"],
            values: [data[1]['Q15'], 100 - data[1]['Q15']],
        }];
        slidectbweb.addImage({
            x: 0.2,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/Hyundai2.png"
        });
        slidectbweb.addImage({
            x: 2.5,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/nlogo.png"
        });
        slidectbweb.addText(`Active Tab:Factor Deep Dive || DIzitization || Overall Experience on CTB Website`, {
            x: 0.5,
            y: 0.4,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });
        slidectbweb.addText(`Applied Filter:${addText}`, {
            x: 0.5,
            y: 0.6,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });
        slidectbweb.addText("% informed about availability of CTB", {
            x: 1.2,
            y: 1.2,
            w: '100%',
            h: 0.5,
            fontSize: 10,
            color: '000000'
        });
        slidectbweb.addText(`${data[1]['Q15']}%`, {
            x: 1.9,
            y: 2.0,
            w: '100%',
            h: 0.5,
            fontSize: 15,
            color: '000000'
        });
        slidectbweb.addText(`(Count-${data[1]['Q15V']})`, {
            x: '29%',
            y: '48%',
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidectbweb.addChart(pptx.charts.DOUGHNUT, graphoverallSSI, {
            x: 1.5,
            y: 1.5,
            w: 1.5,
            h: 1.5,
            chartColors: ["004D99", "E3E3E3"],
            dataBorder: {
                pt: "2",
                color: "F1F1F1"
            },
            dataLabelColor: "000000",
            dataLabelFontSize: 14,

            legendPos: "r",

            showLabel: false,
            showValue: false,
            showPercent: false,
            showLegend: false,
            showTitle: false,

            holeSize: 80,

            title: "Project Status",
            titleColor: "33CF22",
            titleFontFace: "Helvetica Neue",
            titleFontSize: 24,
        });

        graphctbweb2 = [{
            name: "% opted for CTB option for car booking",
            labels: ["% opted for CTB option for car booking", "% opted for CTB option for car booking"],
            values: [data[1]['Q15a'], 100 - data[1]['Q15a']],
        }];
        slidectbweb.addText("% opted for CTB option for car booking", {
            x: 4.0,
            y: 1.2,
            w: '100%',
            h: 0.5,
            fontSize: 10,
            color: '000000'
        });
        slidectbweb.addText(`${data[1]['Q15a']}%`, {
            x: 4.7,
            y: 2.0,
            w: '100%',
            h: 0.5,
            fontSize: 15,
            color: '000000'
        });
        slidectbweb.addText(`(Count-${data[1]['Q15aV']})`, {
            x: '57%',
            y: '48%',
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidectbweb.addChart(pptx.charts.DOUGHNUT, graphctbweb2, {
            x: 4.3,
            y: 1.5,
            w: 1.5,
            h: 1.5,
            chartColors: ["004D99", "E3E3E3"],
            dataBorder: {
                pt: "2",
                color: "F1F1F1"
            },
            dataLabelColor: "000000",
            dataLabelFontSize: 14,

            legendPos: "r",

            showLabel: false,
            showValue: false,
            showPercent: false,
            showLegend: false,
            showTitle: false,

            holeSize: 80,

            title: "Project Status",
            titleColor: "33CF22",
            titleFontFace: "Helvetica Neue",
            titleFontSize: 24,
        });

        graphctbweb3 = [{
            name: "% opted for online finance via CTB website",
            labels: ["% opted for online finance via CTB website",
                "% opted for online finance via CTB website"
            ],
            values: [data[1]['Q15c'], 100 - data[1]['Q15c']],
        }];
        slidectbweb.addText("% opted for online finance via CTB website", {
            x: 6.5,
            y: 1.2,
            w: '100%',
            h: 0.5,
            fontSize: 10,
            color: '000000'
        });
        slidectbweb.addText(`${data[1]['Q15c']}%`, {
            x: 7.4,
            y: 2.0,
            w: '100%',
            h: 0.5,
            fontSize: 15,
            color: '000000'
        });
        slidectbweb.addText(`(Count-${data[1]['Q15cV']})`, {
            x: '84%',
            y: '48%',
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidectbweb.addText(`(Count is the sample size)`, {
            x: '84%',
            y: '50%',
            w: '100%',
            h: 0.5,
            fontSize: 6,
            color: '000000'
        });
        slidectbweb.addChart(pptx.charts.DOUGHNUT, graphctbweb3, {
            x: 7.0,
            y: 1.5,
            w: 1.5,
            h: 1.5,
            chartColors: ["004D99", "E3E3E3"],
            dataBorder: {
                pt: "2",
                color: "F1F1F1"
            },
            dataLabelColor: "000000",
            dataLabelFontSize: 14,

            legendPos: "r",

            showLabel: false,
            showValue: false,
            showPercent: false,
            showLegend: false,
            showTitle: false,

            holeSize: 80,

            title: "Project Status",
            titleColor: "33CF22",
            titleFontFace: "Helvetica Neue",
            titleFontSize: 24,
        });
        slidectbweb.addText("Asked to only those who visited Hyundai Website", {
            x: 6.5,
            y: 3.0,
            w: '100%',
            h: 0.5,
            fontSize: 9,
            color: '000000'
        });

        graphctbweb4 = [{
            name: "Experience on CTB Website While Booking The Car",
            labels: ["% Dissatisfied", "%satisfied"],
            values: [data[1]['Q15bp'], data[1]['Q15bO']],
        }];
        slidectbweb.addText("Experience on CTB Website While Booking The Car", {
            x: 0.5,
            y: 3.4,
            w: '100%',
            h: 0.5,
            fontSize: 10,
            color: '000000'
        });
        slidectbweb.addChart(pptx.charts.BAR, graphctbweb4, {
            x: 0.3,
            y: 3.6,
            w: 3.0,
            h: 1.5,
            chartColors: ['FF9900', '00B050'],
            valAxisHidden: true,
            showPercent: true,
            showPercent: true,
            showValue: true,
            valGridLine: {
                style: 'none'
            },
            barDir: 'bar',
            dataLabelFontBold: true,
            dataLabelFontSize: 8,
            dataLabelColor: "000000",
            dataLabelFormatCode: "#.0"
        });
        slidectbweb.addText(`Satisfied-Rated 1-9(Count-${data[1]['Q15bOAN']})`, {
            x: 3.0,
            y: 4.5,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidectbweb.addText(`Dissatisfied-Rated 9/10(Count-${data[1]['Q15bpAN']})`, {
            x: 3.0,
            y: 4.6,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidectbweb.addText("Asked to only those who visited Hyundai Website", {
            x: 3.0,
            y: 4.7,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        graphctbweb5 = [{
            name: "Experience on CTB Website On Financing & Generating Quotes",
            labels: ["% Dissatisfied", "%satisfied"],
            values: [data[1]['Q15dp'], data[1]['Q15dO']],
        }];
        slidectbweb.addText("Experience on CTB Website On Financing & Generating Quotes", {
            x: 5.0,
            y: 3.4,
            w: '100%',
            h: 0.5,
            fontSize: 10,
            color: '000000'
        });
        slidectbweb.addChart(pptx.charts.BAR, graphctbweb5, {
            x: 4.5,
            y: 3.6,
            w: 3.0,
            h: 1.5,
            chartColors: ['FF9900', '00B050'],
            valAxisHidden: true,
            showPercent: true,
            showPercent: true,
            showValue: true,
            valGridLine: {
                style: 'none'
            },
            barDir: 'bar',
            dataLabelFontBold: true,
            dataLabelFontSize: 8,
            dataLabelColor: "000000",
            dataLabelFormatCode: "#.0"
        });
        slidectbweb.addText(`Satisfied-Rated 1-9(Count-${data[1]['Q15dOAN']})`, {
            x: 7.5,
            y: 4.5,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidectbweb.addText(`Dissatisfied-Rated 9/10(Count-${data[1]['Q15dpAN']})`, {
            x: 7.5,
            y: 4.6,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidectbweb.addText("Asked to only those who visited Hyundai Website", {
            x: 7.5,
            y: 4.7,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });

        slidefacility = pptx.addSlide();
        graphfacility1 = [{
            name: "Facility(Factor Score)",
            labels: ["Facility(Factor Score)", "Facility(Factor Score)"],
            values: [data[2]['dfSSI'], 1000 - data[2]['dfSSI']],
        }];
        slidefacility.addImage({
            x: 0.2,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/Hyundai2.png"
        });
        slidefacility.addImage({
            x: 2.5,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/nlogo.png"
        });
        slidefacility.addText(`Active Tab:Factor Deep Dive || Facility`, {
            x: 0.5,
            y: 0.4,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });
        slidefacility.addText(`Applied Filter:${addText}`, {
            x: 0.5,
            y: 0.6,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });
        slidefacility.addText("Facility(Factor Score)", {
            x: 1.6,
            y: 1.5,
            w: '100%',
            h: 0.5,
            fontSize: 10,
            color: '000000'
        });
        slidefacility.addText(`${data[2]['dfSSI']}`, opts2);
        slidefacility.addChart(pptx.charts.DOUGHNUT, graphfacility1, optsChartPie1);


        graphfacility2 = [{
            name: "Overall % count respondents coded 1-8 in experience of Facility/ Infrastructure",
            labels: ["Overall % count respondents coded 1-8 in experience of Facility/ Infrastructure",
                "Overall % count respondents coded 1-8 in experience of Facility/ Infrastructure"
            ],
            values: [data[3]['Q17'], 100 - data[3]['Q17']],
        }];
        slidefacility.addText("Overall % count respondents coded 1-8 in experience of Facility/ Infrastructure",
            opts3_1);
        slidefacility.addText(`${data[3]['Q17']}%`, {
            x: 6.9,
            y: 2.3,
            w: '100%',
            h: 0.5,
            fontSize: 15,
            color: '000000'
        });
        slidefacility.addText(`(Count-${data[3]['Q17V']})`, {
            x: '91%',
            y: 3.1,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidefacility.addChart(pptx.charts.DOUGHNUT, graphfacility2, {
            x: 6.5,
            y: 1.8,
            w: 1.5,
            h: 1.5,
            chartColors: ["FF9900", "E3E3E3"],
            dataBorder: {
                pt: "2",
                color: "F1F1F1"
            },
            dataLabelColor: "000000",
            dataLabelFontSize: 14,
            legendPos: "r",
            showLabel: false,
            showValue: false,
            showPercent: false,
            showLegend: false,
            showTitle: false,
            holeSize: 80,
            title: "Project Status",
            titleColor: "33CF22",
            titleFontFace: "Helvetica Neue",
            titleFontSize: 24,
        });
        slidefacility.addText("% of people who gave 1-8 Rating to Facility/ Infrastructure", {
            x: 5.5,
            y: 3.1,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });

        graphfacility3 = [{
            name: "Parking Space",
            labels: ["Parking Space", "Parking Space"],
            values: [data[3]['Q18a'], 100 - data[3]['Q18a']],
        }];
        slidefacility.addText("Parking Space", {
            x: 1.8,
            y: 3.5,
            w: '100%',
            h: 0.5,
            fontSize: 14,
            color: '000000'
        });
        slidefacility.addText(`${data[3]['Q18a']}%`, opts8);
        slidefacility.addChart(pptx.charts.DOUGHNUT, graphfacility3, optsChartPie4R);
        slidefacility.addText("Asked to respondents who responded 1-8 for Dealership Facility", {
            x: 0.3,
            y: 5.2,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidefacility.addText(`(Count-${data[3]['Q18aV']})`, {
            x: '29%',
            y: '85%',
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidefacility.addText(`(Count is the sample size)`, {
            x: '29%',
            y: '89%',
            w: '100%',
            h: 0.5,
            fontSize: 6,
            color: '000000'
        });

        graphfacility4 = [{
            name: "Showroom Cleanliness",
            labels: ["Showroom Cleanliness", "Showroom Cleanliness"],
            values: [data[3]['Q18c'], 100 - data[3]['Q18c']],
        }];
        slidefacility.addText("Showroom Cleanliness", opts9_1);
        slidefacility.addText(`${data[3]['Q18c']}%`, opts10_1);
        slidefacility.addChart(pptx.charts.DOUGHNUT, graphfacility4, optsChartPie5_1R);
        slidefacility.addText("Asked to respondents who responded 1-8 for Dealership Facility", {
            x: 3.6,
            y: 5.2,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidefacility.addText(`(Count-${data[3]['Q18cV']})`, {
            x: '59%',
            y: '85%',
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });

        slidefacility.addText(`(Count is the sample size)`, {
            x: '59%',
            y: '89%',
            w: '100%',
            h: 0.5,
            fontSize: 6,
            color: '000000'
        });

        graphfacility5 = [{
            name: "Quality of amenities",
            labels: ["Quality of amenities", "Quality of amenities"],
            values: [data[3]['Q18d'], 100 - data[3]['Q18d']],
        }];
        slidefacility.addText("Quality of amenities", {
            x: 6.9,
            y: 3.5,
            w: '100%',
            h: 0.5,
            fontSize: 14,
            color: '000000'
        });
        slidefacility.addText(`${data[3]['Q18d']}%`, opts12);
        slidefacility.addChart(pptx.charts.DOUGHNUT, graphfacility5, optsChartPie6R);
        slidefacility.addText("Asked to respondents who responded 1-8 for Dealership Facility", {
            x: 6.6,
            y: 5.2,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidefacility.addText(`(Count-${data[3]['Q18dV']})`, {
            x: '90%',
            y: '85%',
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidefacility.addText(`(Count is the sample size)`, {
            x: '90%',
            y: '89%',
            w: '100%',
            h: 0.5,
            fontSize: 6,
            color: '000000'
        });

        slidesc = pptx.addSlide();
        graphsc1 = [{
            name: "Sales Consultant(Factor Score)",
            labels: ["Sales Consultant(Factor Score)", "Sales Consultant(Factor Score)"],
            values: [data[2]['scSSI'], 1000 - data[2]['scSSI']],
        }];
        slidesc.addImage({
            x: 0.2,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/Hyundai2.png"
        });
        slidesc.addImage({
            x: 2.5,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/nlogo.png"
        });
        slidesc.addText(`Active Tab:Factor Deep Dive || Sales Consultant`, {
            x: 0.5,
            y: 0.4,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });
        slidesc.addText(`Applied Filter:${addText}`, {
            x: 0.5,
            y: 0.6,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });
        slidesc.addText("Sales Consultant(Factor Score)", {
            x: 1.6,
            y: 1.5,
            w: '100%',
            h: 0.5,
            fontSize: 10,
            color: '000000'
        });
        slidesc.addText(`${data[2]['scSSI']}`, opts2);
        slidesc.addChart(pptx.charts.DOUGHNUT, graphsc1, optsChartPie1);

        graphsc2 = [{
            name: "Diagnostics(Sales Consultant)",

            labels: ["f.Asked respondent to sit on driver's seat while giving demo",
                "e.Explained about Hyundai’s edge over its competition",
                "d.Gave comprehensive explanation of car features/benefits of Vehicle",
                "c.Explained benefits of buying VAS", "b.Informed about monthly consumer schemesr",
                "a.Shared brochure/price list etc with the customer"
            ],
            values: [data[4]['Q19f'], data[4]['Q19e3'], data[4]['Q19e'], data[4]['Q19a3'], data[4]['Q19a2'],
                data[4]['Q19a1']
            ]

        }];
        slidesc.addText("Diagnostics(Sales Consultant)", {
            x: 6.0,
            y: 1.5,
            w: '100%',
            h: 0.5,
            fontSize: 10,
            color: '000000'
        });
        slidesc.addChart(pptx.charts.BAR, graphsc2, {
            x: 4.0,
            y: 1.8,
            w: 6.0,
            h: 1.5,
            chartColors: ['004D99'],
            valAxisHidden: true,
            showPercent: true,
            showPercent: true,
            showValue: true,
            valGridLine: {
                style: 'none'
            },
            barDir: 'bar',
            dataLabelFontBold: true,
            dataLabelFontSize: 8,
            dataLabelColor: "000000",
            catAxisLabelFontSize: 6,
            dataLabelFormatCode: "#.0"
        });
        slidesc.addText("(Shown as % of Respondents say YES)", {
            x: '75%',
            y: '55%',
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidesc.addText(
            `(Count-a(${data[4]['Q19a1V']}) ,b(${data[4]['Q19a2V']}), c(${data[4]['Q19a3V']}), d(${data[4]['Q19eV']}), e(${data[4]['Q19fV']}), f(${data[4]['Q19e3V']}))`, {
                x: '72%',
                y: '58%',
                w: '100%',
                h: 0.5,
                fontSize: 7,
                color: '000000'
            });
        graphsc4 = [{
            name: "Demo of the car by Sales Person",
            labels: ["%Satisfied", "%Dissatisfied"],
            values: [data[4]['Q19e2O'], data[4]['Q19e2p']]
        }];
        slidesc.addText("Demo of the car by Sales Person", {
            x: 0.5,
            y: 3.5,
            w: '100%',
            h: 0.5,
            fontSize: 10,
            color: '000000'
        });
        slidesc.addChart(pptx.charts.BAR, graphsc4, {
            x: '15%',
            y: 4,
            w: 6.0,
            h: 1.5,
            chartColors: ['00B050', 'FF9900'],
            valAxisHidden: true,
            showPercent: true,
            showPercent: true,
            showValue: true,
            valGridLine: {
                style: 'none'
            },
            barDir: 'bar',
            dataLabelFontBold: true,
            dataLabelFontSize: 8,
            dataLabelColor: "000000",
            dataLabelFormatCode: "#.0"
        });
        slidesc.addText(`(Count-a(${data[4]['Q19e2OAN']}) ,b(${data[4]['Q19e2pAN']}) )`, {
            x: '32%',
            y: '90%',
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidetestXS = pptx.addSlide();
        slidetestXS.addImage({
            x: 0.2,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/Hyundai2.png"
        });
        slidetestXS.addImage({
            x: 2.5,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/nlogo.png"
        });
        slidetestXS.addText(`Active Tab:Factor Deep Dive || Sales Consultant`, {
            x: 0.5,
            y: 0.4,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });
        slidetestXS.addText(`Applied Filter:${addText}`, {
            x: 0.5,
            y: 0.6,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });

        graphsc3 = [{
            name: "Overall % count respondents coded 1-8 in experience of Sales Consultant",
            labels: ["Overall % count respondents coded 1-8 in experience of Sales Consultant",
                "Overall % count respondents coded 1-8 in experience of Sales Consultant"
            ],
            values: [data[4]['Q19'], 100 - data[4]['Q19']],
        }];
        slidetestXS.addText("Overall % count respondents coded 1-8 in experience of Sales Consultant", {
            x: 0.5,
            y: 1.2,
            w: '100%',
            h: 0.5,
            fontSize: 10,
            color: '000000'
        });
        slidetestXS.addText(`${data[4]['Q19']}%`, opts2);
        slidetestXS.addChart(pptx.charts.DOUGHNUT, graphsc3, optsChartPie1);
        slidetestXS.addText("% of people who gave 1-8 Rating to Sales Consultant", {
            x: 1.0,
            y: '55%',
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidetestXS.addText(`(Count-${data[4]['Q19V']})`, {
            x: '32%',
            y: '60%',
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });

        slidetestXS.addText(`(Count is the sample size)`, {
            x: '32%',
            y: '64%',
            w: '100%',
            h: 0.5,
            fontSize: 6,
            color: '000000'
        });

        graphsc4 = [{
            name: "Diagnostics- Weak Areas(Sales Consultant)",
            labels: ["c.Did not ask question to determine model, features and options important to customer",
                "b.Did not used any digital devices to introduce customer to the vehicle",
                "a.Did not meet within reasonable time on customer arrival at dealership"
            ],
            values: [data[4]['Q19d'], data[4]['Q19b'], data[4]['Q19a']],
        }];
        slidetestXS.addText("Diagnostics- Weak Areas(Sales Consultant)", {
            x: 5.8,
            y: 1.2,
            w: '100%',
            h: 0.5,
            fontSize: 10,
            color: '000000'
        });
        slidetestXS.addChart(pptx.charts.BAR, graphsc4, {
            x: 5.5,
            y: 1.5,
            w: 4.5,
            h: 1.5,
            chartColors: ['FF9900'],
            valAxisHidden: true,
            showPercent: true,
            showPercent: true,
            showValue: true,
            valGridLine: {
                style: 'none'
            },
            barDir: 'bar',
            dataLabelFontBold: true,
            dataLabelFontSize: 8,
            dataLabelColor: "000000",
            catAxisLabelFontSize: 6,
            dataLabelFormatCode: "#.0"
        });
        slidetestXS.addText("(Shown as % of Respondents say YES)", {
            x: 4.8,
            y: '60%',
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidetestXS.addText(`(Count-a(${data[4]['Q19aV']}), b(${data[4]['Q19bV']}), c(${data[4]['Q19dV']}) )`, {
            x: '86%',
            y: '60%',
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });

        slidetest = pptx.addSlide();
        graphtest1 = [{
            name: "% Offered test drive at the dealership",
            labels: ["% Offered test drive at the dealership", "% Offered test drive at the dealership"],
            values: [data[5]['Q20'], 100 - data[5]['Q20']],
        }];
        slidetest.addImage({
            x: 0.2,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/Hyundai2.png"
        });
        slidetest.addImage({
            x: 2.5,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/nlogo.png"
        });
        slidetest.addText(`Active Tab:Factor Deep Dive || Test Drive`, {
            x: 0.5,
            y: 0.4,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });
        slidetest.addText(`Applied Filter:${addText}`, {
            x: 0.5,
            y: 0.6,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });
        slidetest.addText("% Offered test drive at the dealership", {
            x: 1.2,
            y: 1.5,
            w: '100%',
            h: 0.5,
            fontSize: 10,
            color: '000000'
        });
        slidetest.addText(`${data[5]['Q20']}%`, {
            x: 1.9,
            y: 2.3,
            w: '100%',
            h: 0.5,
            fontSize: 15,
            color: '000000'
        });
        slidetest.addChart(pptx.charts.DOUGHNUT, graphtest1, optsChartPie1);
        slidetest.addText("(Shown as % of Respondents say YES)", {
            x: 1.2,
            y: 3.2,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidetest.addText(`(Count-${data[5]['Q20V']})`, {
            x: '32%',
            y: 3.2,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidetest.addText(`(Count is the sample size)`, {
            x: '32%',
            y: 3.3,
            w: '100%',
            h: 0.5,
            fontSize: 6,
            color: '000000'
        });
        slidetest.addText(`Satisfied-Rated 9/10(Count-${data[5]['Q22OAN']})`, {
            x: 3.0,
            y: 4.8,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidetest.addText(`Dissatisfied-Rated 1-8(Count-${data[5]['Q22pAN']})`, {
            x: 3.0,
            y: 4.9,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidetest.addText("Asked to only those who visited Hyundai Website", {
            x: 3.0,
            y: 5.0,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        graphtest2 = [{
            name: "% took test drive at the dealership from where vehicle was purchased",
            labels: ["% took test drive at the dealership from where vehicle was purchased",
                "% took test drive at the dealership from where vehicle was purchased"
            ],
            values: [data[5]['Q21'], 100 - data[5]['Q21']],
        }];
        slidetest.addText("% took test drive at the dealership from where vehicle was purchased", opts3_1);
        slidetest.addText(`${data[5]['Q21']}%`, {
            x: 6.4,
            y: 2.3,
            w: '100%',
            h: 0.5,
            fontSize: 15,
            color: '000000'
        });
        slidetest.addChart(pptx.charts.DOUGHNUT, graphtest2, {
            x: 6.0,
            y: 1.8,
            w: 1.5,
            h: 1.5,
            chartColors: ["004D99", "E3E3E3"],
            dataBorder: {
                pt: "2",
                color: "F1F1F1"
            },
            dataLabelColor: "000000",
            dataLabelFontSize: 14,

            legendPos: "r",

            showLabel: false,
            showValue: false,
            showPercent: false,
            showLegend: false,
            showTitle: false,

            holeSize: 80,

            title: "Project Status",
            titleColor: "33CF22",
            titleFontFace: "Helvetica Neue",
            titleFontSize: 24,
        });
        slidetest.addText("(Shown as % of Respondents say YES)", {
            x: 6.2,
            y: 3.2,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidetest.addText(`(Count-${data[5]['Q21V']})`, {
            x: "85%",
            y: 3.2,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidetest.addText(`(Count is the sample size)`, {
            x: "85%",
            y: 3.4,
            w: '100%',
            h: 0.5,
            fontSize: 6,
            color: '000000'
        });

        graphtest3 = [{
            name: "Test Drive Experience",
            labels: ["% Dissatisfied", "% satisfied"],
            values: [data[5]['Q22p'], data[5]['Q22O']],
        }];
        slidetest.addText("Test Drive Experience", {
            x: 0.6,
            y: 3.5,
            w: '100%',
            h: 0.5,
            fontSize: 10,
            color: '000000'
        });
        slidetest.addChart(pptx.charts.BAR, graphtest3, {
            x: 0.0,
            y: 4.0,
            w: 4.5,
            h: 1.5,
            chartColors: ['FF9900', '00B050'],
            valAxisHidden: true,
            showPercent: true,
            showPercent: true,
            showValue: true,
            valGridLine: {
                style: 'none'
            },
            barDir: 'bar',
            dataLabelFontBold: true,
            dataLabelFontSize: 8,
            dataLabelColor: "000000",
            dataLabelFormatCode: "#.0"
        });

        graphtest4 = [{
            name: "Reason for Not Taking Test Drive",
            labels: ["c.Test drive vehicle was unavailable", "b.Didn\'t want/need test drive",
                "a.Test drive at another dealership"
            ],
            values: [data[5]['Q23'][2], data[5]['Q23'][1], data[5]['Q23'][0]],
        }];
        slidetest.addText("Reason for Not Taking Test Drive", {
            x: 5.7,
            y: 3.5,
            w: '100%',
            h: 0.5,
            fontSize: 10,
            color: '000000'
        });
        slidetest.addChart(pptx.charts.BAR, graphtest4, {
            x: 5.5,
            y: 4.0,
            w: 4.5,
            h: 1.5,
            chartColors: ['004D99'],
            valAxisHidden: true,
            showPercent: true,
            showPercent: true,
            showValue: true,
            valGridLine: {
                style: 'none'
            },
            barDir: 'bar',
            dataLabelFontBold: true,
            dataLabelFontSize: 8,
            dataLabelColor: "000000",
            dataLabelFormatCode: "#.0"
        });
        slidetest.addText("(Shown as % of Respondents say YES)", {
            x: 6.5,
            y: 5.2,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidetest.addText(`(Count-a(${data[5]['Q23V'][0]}), b(${data[5]['Q23V'][1]}), c(${data[5]['Q23V'][2]}))`, {
            x: '81%',
            y: 5.2,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidedeal = pptx.addSlide();
        graphdeal1 = [{
            name: "Deal(Factor Score)",
            labels: ["Deal(Factor Score)", "Deal(Factor Score)"],
            values: [data[2]['dSSI'], 1000 - data[2]['dSSI']],
        }];
        slidedeal.addImage({
            x: 0.2,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/Hyundai2.png"
        });
        slidedeal.addImage({
            x: 2.5,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/nlogo.png"
        });
        slidedeal.addText(`Active Tab:Factor Deep Dive || Deal`, {
            x: 0.5,
            y: 0.4,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });
        slidedeal.addText(`Applied Filter:${addText}`, {
            x: 0.5,
            y: 0.6,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });
        slidedeal.addText("Deal(Factor Score)", {
            x: 1.6,
            y: 1.5,
            w: '100%',
            h: 0.5,
            fontSize: 10,
            color: '000000'
        });
        slidedeal.addText(`${data[2]['dSSI']}`, opts2);
        slidedeal.addChart(pptx.charts.DOUGHNUT, graphdeal1, optsChartPie1);


        graphdeal2 = [{
            name: "Overall % count respondents coded 1-8 in experience of Deal Diagnostics",
            labels: ["Overall % count respondents coded 1-8 in experience of Deal Diagnostics",
                "Overall % count respondents coded 1-8 in experience of Deal Diagnostics"
            ],
            values: [data[6]['Q24'], 100 - data[6]['Q24']],
        }];
        slidedeal.addText("Overall % count respondents coded 1-8 in experience of Deal Diagnostics", opts3_1);
        slidedeal.addText(`${data[6]['Q24']}%`, opts4_1);
        slidedeal.addChart(pptx.charts.DOUGHNUT, graphdeal2, optsChartPie2_1R);
        slidedeal.addText("% respondents who responded 1-8 in experience of Deal Diagnostics", {
            x: 6.2,
            y: 3.2,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidedeal.addText(`(Count-${data[6]['Q24V']})`, {
            x: '91%',
            y: 3.1,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidedeal.addText(`(Count is the sample size)`, {
            x: '91%',
            y: 3.3,
            w: '100%',
            h: 0.5,
            fontSize: 6,
            color: '000000'
        });
        graphtest3 = [{
            name: "Diagnostic",
            labels: ["d.% respondents say Sales Consultant pressurized them for vehicle purchase",
                "c.% respondents say that Sales Consultant informed them about price rise during negotiation stage",
                "b.% respondent say that Sales Consultant changed the promised price later",
                "a.% respondent say they got a difficulty in getting Cost of Vehicle"
            ],
            values: [data[6]['Q25'][3], data[6]['Q25'][2], data[6]['Q25'][1], data[6]['Q25'][0]],
        }];
        slidedeal.addText("Diagnostic", {
            x: 4.5,
            y: 3.5,
            w: '100%',
            h: 0.5,
            fontSize: 10,
            color: '000000'
        });
        slidedeal.addChart(pptx.charts.BAR, graphtest3, {
            x: 1.2,
            y: 4.0,
            w: 6.5,
            h: 1.5,
            chartColors: ['FF9900'],
            valAxisHidden: true,
            showPercent: true,
            showPercent: true,
            showValue: true,
            valGridLine: {
                style: 'none'
            },
            barDir: 'bar',
            dataLabelFontBold: true,
            dataLabelFontSize: 8,
            dataLabelColor: "000000",
            catAxisLabelFontSize: 6,
            dataLabelFormatCode: "#.0"
        });
        slidedeal.addText("(Shown as % of Respondents say YES)", {
            x: 5.8,
            y: 5.1,
            w: '100%',
            h: 0.5,
            fontSize: 9,
            color: '000000'
        });
        slidedeal.addText("Asked to respondents who coded 1-8 in Overall Experience with working out deal", {
            x: 5.8,
            y: 5.2,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidedeal.addText(
            `(Count-a(${data[6]['Q25V'][0]}), b(${data[6]['Q25V'][1]}), c(${data[6]['Q25V'][2]}), d(${data[6]['Q25V'][3]}) )`, {
                x: '86%',
                y: '90%',
                w: '100%',
                h: 0.5,
                fontSize: 7,
                color: '000000'
            });
        slidepaper = pptx.addSlide();
        graphpaper1 = [{
            name: "Paperwork(Factor Score)",
            labels: ["Paperwork(Factor Score)", "Paperwork(Factor Score)"],
            values: [data[2]['paperSSI'], 1000 - data[2]['paperSSI']],
        }];
        slidepaper.addImage({
            x: 0.2,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/Hyundai2.png"
        });
        slidepaper.addImage({
            x: 2.5,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/nlogo.png"
        });
        slidepaper.addText(`Active Tab:Factor Deep Dive || Paperwork`, {
            x: 0.5,
            y: 0.4,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });
        slidepaper.addText(`Applied Filter:${addText}`, {
            x: 0.5,
            y: 0.6,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });
        slidepaper.addText("Paperwork(Factor Score)", {
            x: 1.6,
            y: 1.5,
            w: '100%',
            h: 0.5,
            fontSize: 10,
            color: '000000'
        });
        slidepaper.addText(`${data[2]['paperSSI']}`, opts2);
        slidepaper.addChart(pptx.charts.DOUGHNUT, graphpaper1, optsChartPie1);

        graphpaper2 = [{
            name: "Overall % count respondents coded 1-8 in experience of Paperwork",
            labels: ["Overall % count respondents coded 1-8 in experience of Paperwork",
                "Overall % count respondents coded 1-8 in experience of Paperwork"
            ],
            values: [data[7]['Q26N'], 100 - data[7]['Q26N']],
        }];
        slidepaper.addText("Overall % count respondents coded 1-8 in experience of Paperwork", opts3_1);
        slidepaper.addText(`${data[7]['Q26N']}%`, opts4_1);
        slidepaper.addChart(pptx.charts.DOUGHNUT, graphpaper2, optsChartPie2_1R);
        slidepaper.addText("% respondents who responded 1-8 in experience of Paperwork completion", {
            x: 6.0,
            y: 3.2,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidepaper.addText(`(Count-${data[7]['Q26NV']})`, {
            x: '91%',
            y: 3.1,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidepaper.addText(`(Count is the sample size)`, {
            x: '91%',
            y: 3.3,
            w: '100%',
            h: 0.5,
            fontSize: 6,
            color: '000000'
        });
        graphpaper3 = [{
            name: "Time Taken to Complete paperwork",
            labels: ["c.Less than My Expectations", "b.Same as My Expectations", "a.More than My Expectations"],
            values: [data[7]['Q26a'][2], data[7]['Q26a'][1], data[7]['Q26a'][0]],
        }];
        slidepaper.addText("Time Taken to Complete paperwork", {
            x: 0.3,
            y: 3.5,
            w: '100%',
            h: 0.5,
            fontSize: 10,
            color: '000000'
        });
        slidepaper.addChart(pptx.charts.BAR, graphpaper3, {
            x: 0.0,
            y: 4.0,
            w: 4.5,
            h: 1.5,
            chartColors: ['00B050', 'FAFA33', 'FF9900'],
            valAxisHidden: true,
            showPercent: true,
            showPercent: true,
            showValue: true,
            valGridLine: {
                style: 'none'
            },
            barDir: 'bar',
            dataLabelFontBold: true,
            dataLabelFontSize: 8,
            dataLabelColor: "000000",
            dataLabelFormatCode: "#.0"
        });
        slidepaper.addText(
            "Asked to respondents who coded 1-8 in Overall Experience of paperwork completion with dealership", {
                x: 1.0,
                y: 5.2,
                w: '80%',
                h: 0.5,
                fontSize: 6,
                color: '000000'
            });
        slidepaper.addText(`(Count-a(${data[7]['Q26aV'][0]}), b(${data[7]['Q26aV'][1]}), c(${data[7]['Q26aV'][2]}) )`, {
            x: '32%',
            y: '90%',
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        graphpaper4 = [{
            name: "Paperwork Process Explanation",
            labels: ["c.Did not explain clearly at all", "b.Explained somewhat clearly",
                "a.Explained with fully clarity"
            ],
            values: [data[7]['Q26b'][2], data[7]['Q26b'][1], data[7]['Q26b'][0]],
        }];
        slidepaper.addText("Paperwork Process Explanation", {
            x: 5.5,
            y: 3.5,
            w: '100%',
            h: 0.5,
            fontSize: 10,
            color: '000000'
        });
        slidepaper.addChart(pptx.charts.BAR, graphpaper4, {
            x: 5.5,
            y: 4.0,
            w: 4.5,
            h: 1.5,
            chartColors: ['FF9900', 'FAFA33', '00B050'],
            valAxisHidden: true,
            showPercent: true,
            showPercent: true,
            showValue: true,
            valGridLine: {
                style: 'none'
            },
            barDir: 'bar',
            dataLabelFontBold: true,
            dataLabelFontSize: 8,
            dataLabelColor: "000000",
            dataLabelFormatCode: "#.0"
        });
        slidepaper.addText(
            "Asked to respondents who coded 1-8 in Overall Experience of paperwork completion with dealership", {
                x: 6.5,
                y: 5.2,
                w: '80%',
                h: 0.5,
                fontSize: 6,
                color: '000000'
            });
        slidepaper.addText(`(Count-a(${data[7]['Q26bV'][0]}), b(${data[7]['Q26bV'][1]}), c(${data[7]['Q26bV'][2]}) )`, {
            x: '86%',
            y: '90%',
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidepaper2 = pptx.addSlide();
        graphpaper5 = [{
            name: "Diagnostics",
            labels: [
                "c.% respondent say that they have to Follow-up/Return at dealership for Paperwork Problem",
                "b.% respondent say that staff at dealership did addition in Non agreed products",
                "a.% respondent say that sales consultant Pressurize for Purchase of additional Products"
            ],
            values: [data[7]['Q26'][2], data[7]['Q26'][1], data[7]['Q26'][0]],
        }];
        slidepaper2.addImage({
            x: 0.2,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/Hyundai2.png"
        });
        slidepaper2.addImage({
            x: 2.5,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/nlogo.png"
        });
        slidepaper2.addText(`Active Tab:Factor Deep Dive || Paperwork`, {
            x: 0.5,
            y: 0.4,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });
        slidepaper2.addText(`Applied Filter:${addText}`, {
            x: 0.5,
            y: 0.6,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });
        slidepaper2.addText("Diagnostics", {
            x: 3.9,
            y: 1.5,
            w: '100%',
            h: 0.5,
            fontSize: 14,
            color: '000000'
        });
        slidepaper2.addChart(pptx.charts.BAR, graphpaper5, {
            x: 1.5,
            y: 2.2,
            w: 7.0,
            h: 1.5,
            chartColors: ['FF9900', 'FF9900', 'FF9900'],
            valAxisHidden: true,
            showPercent: true,
            showPercent: true,
            showValue: true,
            valGridLine: {
                style: 'none'
            },
            barDir: 'bar',
            dataLabelFontBold: true,
            dataLabelFontSize: 8,
            dataLabelColor: "000000",
            catAxisLabelFontSize: 6
        });
        slidepaper2.addText(
            "Asked to respondents who coded 1-8 in Overall Experience of paperwork completion with dealership", {
                x: 1.5,
                y: 3.9,
                w: '100%',
                h: 0.5,
                fontSize: 7,
                color: '000000'
            });
        slidepaper2.addText(`(Count-a(${data[7]['Q26V'][0]}),b(${data[7]['Q26V'][1]}),c(${data[7]['Q26V'][2]}))`, {
            x: 3.0,
            y: 3.7,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidedelivery = pptx.addSlide();
        graphdelivery1 = [{
            name: "Delivery(Factor Score)",
            labels: ["Delivery(Factor Score)", "Delivery(Factor Score)"],
            values: [data[2]['deSSI'], 1000 - data[2]['deSSI']],
        }];
        slidedelivery.addImage({
            x: 0.2,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/Hyundai2.png"
        });
        slidedelivery.addImage({
            x: 2.5,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/nlogo.png"
        });
        slidedelivery.addText(`Active Tab:Factor Deep Dive || Delivery`, {
            x: 0.5,
            y: 0.4,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });
        slidedelivery.addText(`Applied Filter:${addText}`, {
            x: 0.5,
            y: 0.6,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });
        slidedelivery.addText("Delivery(Factor Score)", {
            x: 1.6,
            y: 1.5,
            w: '100%',
            h: 0.5,
            fontSize: 10,
            color: '000000'
        });
        slidedelivery.addText(`${data[2]['deSSI']}`, opts2);
        slidedelivery.addChart(pptx.charts.DOUGHNUT, graphdelivery1, optsChartPie1);

        graphdelivery2 = [{
            name: "Overall % count respondents coded 1-8 in experience of delivery of new vehicle",
            labels: ["Overall % count respondents coded 1-8 in experience of delivery of new vehicle",
                "Overall % count respondents coded 1-8 in experience of delivery of new vehicle"
            ],
            values: [data[8]['Q27'], 100 - data[8]['Q27']],
        }];
        slidedelivery.addText("Overall % count respondents coded 1-8 in experience of delivery of new vehicle",
            opts3_1);
        slidedelivery.addText(`${data[8]['Q27']}%`, opts4_1);
        slidedelivery.addText(`(Count-${data[3]['Q17V']})`, {
            x: '91%',
            y: 3.1,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidedelivery.addText(`(Count is the sample size)`, {
            x: '91%',
            y: 3.3,
            w: '100%',
            h: 0.5,
            fontSize: 6,
            color: '000000'
        });
        slidedelivery.addChart(pptx.charts.DOUGHNUT, graphdelivery2, optsChartPie2_1R);
        slidedelivery.addText("% respondents who responded 1-8 in experience of delivery of new vehicle", {
            x: 6.0,
            y: 3.2,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        graphdelivery3 = [{
            name: "Condition Of Vehicle During delivery",
            labels: ["d.Vehicle had dents/scratches", "c.Vehicle was not fitted", "b.Vehicle was not clean",
                "a.Vehicle was delivered with no issues"
            ],
            values: [data[8]['Q28a'][3], data[8]['Q28a'][2], data[8]['Q28a'][1], data[8]['Q28a'][0]],
        }];;
        slidedelivery.addText("Condition Of Vehicle During delivery", {
            x: 0.3,
            y: 3.5,
            w: '100%',
            h: 0.5,
            fontSize: 10,
            color: '000000'
        });
        slidedelivery.addChart(pptx.charts.BAR, graphdelivery3, {
            x: 0.0,
            y: 4.0,
            w: 3.0,
            h: 1.5,
            chartColors: ['FF9900', 'FF9900', 'FF9900', '00B050'],
            valAxisHidden: true,
            showPercent: true,
            showPercent: true,
            showValue: true,
            valGridLine: {
                style: 'none'
            },
            barDir: 'bar',
            dataLabelFontBold: true,
            dataLabelFontSize: 8,
            dataLabelColor: "000000",
            catAxisLabelFontSize: 6,
            dataLabelFormatCode: "#.0"
        });
        slidedelivery.addText("Asked to respondents who coded 1-8 in Overall Experience of delivery of new vehicle", {
            x: 0.3,
            y: 5.2,
            w: '70%',
            h: 0.5,
            fontSize: 6,
            color: '000000'
        });
        slidedelivery.addText(
            `(Count-a(${data[8]['Q28aV'][0]}),b(${data[8]['Q28aV'][1]}),c(${data[8]['Q28aV'][2]}),d(${data[8]['Q28aV'][3]}))`, {
                x: '23%',
                y: '85%',
                w: '100%',
                h: 0.5,
                fontSize: 7,
                color: '000000'
            });
        graphdelivery4 = [{
            name: "Quality of Vehicle Operating Control During Delivery",
            labels: ["c.Poor Explanation", "b.Explained Somewhat", "a.Explained in Detail"],
            values: [data[8]['Q28b'][2], data[8]['Q28b'][1], data[8]['Q28b'][0]],
        }];
        slidedelivery.addText("Quality of Explanations of Vehicle’s Operating Controls", {
            x: 2.9,
            y: 3.5,
            w: '100%',
            h: 0.5,
            fontSize: 10,
            color: '000000'
        });
        slidedelivery.addChart(pptx.charts.BAR, graphdelivery4, {
            x: 3.0,
            y: 4.0,
            w: 3.0,
            h: 1.5,
            chartColors: ['FF9900', 'FAFA33', '00B050'],
            valAxisHidden: true,
            showPercent: true,
            showPercent: true,
            showValue: true,
            valGridLine: {
                style: 'none'
            },
            barDir: 'bar',
            dataLabelFontBold: true,
            dataLabelFontSize: 8,
            dataLabelColor: "000000",
            catAxisLabelFontSize: 6,
            dataLabelFormatCode: "#.0"
        });
        slidedelivery.addText("Asked to respondents who coded 1-8 in Overall Experience of delivery of new vehicle", {
            x: 3.6,
            y: 5.2,
            w: '70%',
            h: 0.5,
            fontSize: 6,
            color: '000000'
        });
        slidedelivery.addText(`(Count-a(${data[8]['Q28bV'][0]}),b(${data[8]['Q28bV'][1]}),c(${data[8]['Q28bV'][2]}))`, {
            x: '59%',
            y: '85%',
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        graphdelivery5 = [{
            name: "Time Taken In Delivery Process",
            labels: ["c.Took longer than i expected", "b.Time taken was same as what i expected",
                "a.TIme taken was faster than what i expected"
            ],
            values: [data[8]['Q28e'][2], data[8]['Q28e'][1], data[8]['Q28e'][0]],
        }];
        slidedelivery.addText("Time Taken In Delivery Process", {
            x: 6.8,
            y: 3.5,
            w: '100%',
            h: 0.5,
            fontSize: 10,
            color: '000000'
        });
        slidedelivery.addChart(pptx.charts.BAR, graphdelivery5, {
            x: 6.5,
            y: 4.0,
            w: 3.0,
            h: 1.5,
            chartColors: ['FF9900', 'FAFA33', '00B050'],
            valAxisHidden: true,
            showPercent: true,
            showPercent: true,
            showValue: true,
            valGridLine: {
                style: 'none'
            },
            barDir: 'bar',
            dataLabelFontBold: true,
            dataLabelFontSize: 8,
            dataLabelColor: "000000",
            catAxisLabelFontSize: 6,
            dataLabelFormatCode: "#.0"
        });
        slidedelivery.addText("Asked to respondents who coded 1-8 in Overall Experience of delivery of new vehicle", {
            x: 6.6,
            y: 5.2,
            w: '70%',
            h: 0.5,
            fontSize: 6,
            color: '000000'
        });
        slidedelivery.addText(`(Count-a(${data[8]['Q28eV'][0]}),b(${data[8]['Q28eV'][1]}),c(${data[8]['Q28eV'][2]}))`, {
            x: '90%',
            y: '85%',
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidedelivery2 = pptx.addSlide();
        graphdelivery6 = [{
            name: "% customers was introduced to someone in service department by sales executive",
            labels: ["% customers was introduced to someone in service department by sales executive",
                "% customers was introduced to someone in service department by sales executive"
            ],
            values: [data[8]['Q28d'], 100 - data[8]['Q28d']],
        }];
        slidedelivery2.addImage({
            x: 0.2,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/Hyundai2.png"
        });
        slidedelivery2.addImage({
            x: 2.5,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/nlogo.png"
        });
        slidedelivery2.addText(`Active Tab:Factor Deep Dive || Delivery`, {
            x: 0.5,
            y: 0.4,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });
        slidedelivery2.addText(`Applied Filter:${addText}`, {
            x: 0.5,
            y: 0.6,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });
        slidedelivery2.addText("% customers was introduced to someone in service department by sales executive", {
            x: 2.0,
            y: 1.5,
            w: '100%',
            h: 0.5,
            fontSize: 12,
            color: '000000'
        });
        slidedelivery2.addText(`${data[8]['Q28d']}`, {
            x: 4.3,
            y: 2.3,
            w: '100%',
            h: 0.5,
            fontSize: 15,
            color: '000000'
        });
        slidedelivery2.addChart(pptx.charts.DOUGHNUT, graphdelivery6, {
            x: 3.8,
            y: 1.8,
            w: 1.5,
            h: 1.5,
            chartColors: ["004D99", "E3E3E3"],
            dataBorder: {
                pt: "2",
                color: "F1F1F1"
            },
            dataLabelColor: "000000",
            dataLabelFontSize: 14,
            legendPos: "r",
            showLabel: false,
            showValue: false,
            showPercent: false,
            showLegend: false,
            showTitle: false,
            holeSize: 80,
            title: "Project Status",
            titleColor: "33CF22",
            titleFontFace: "Helvetica Neue",
            titleFontSize: 24,
        });
        slidedelivery2.addText("Asked to respondents who coded 1-8 in Overall Experience of delivery of new vehicle", {
            x: 1.8,
            y: 3.5,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidedelivery2.addText(`(Count-${data[8]['Q28dV']})`, {
            x: 3.0,
            y: 3.7,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidedelivery2.addText(`(Count is the sample size)`, {
            x: 3.0,
            y: 3.9,
            w: '100%',
            h: 0.5,
            fontSize: 6,
            color: '000000'
        });
        slidedelivery3 = pptx.addSlide();
        graphpaper7 = [{
            name: "Diagnostics",
            labels: cat2X.reverse(),
            values: val2X.reverse()
        }];
        //     graphpaper7 = [{
        // 			name: "Diagnostics",
        // 			labels: ["% respondent follow-up call after deliver","% respondent say that the vehicle was delivery with a Ceremony","% respondent say vehicle was delivered with all Promised Feature","% respondent say sales consultant Informed them  of Delivery Status","% respondent say dealership Agree for Home Delivery of vehicle when requested"],
        // 			values: [data[8]['delivery_attr'][4],data[8]['delivery_attr'][3],data[8]['delivery_attr'][2],data[8]['delivery_attr'][1],data[8]['delivery_attr'][0]],
        // 		}];
        data[8]['delivery_attrV'].sort((a, b) => b - a);
        slidedelivery3.addImage({
            x: 0.2,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/Hyundai2.png"
        });
        slidedelivery3.addImage({
            x: 2.5,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/nlogo.png"
        });
        slidedelivery3.addText(`Active Tab:Factor Deep Dive || Delivery`, {
            x: 0.5,
            y: 0.4,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });
        slidedelivery3.addText(`Applied Filter:${addText}`, {
            x: 0.5,
            y: 0.6,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });
        slidedelivery3.addText("Diagnostics", {
            x: 3.9,
            y: 1.5,
            w: '100%',
            h: 0.5,
            fontSize: 10,
            color: '000000'
        });
        slidedelivery3.addChart(pptx.charts.BAR, graphpaper7, {
            x: 1.5,
            y: 2.0,
            w: 7.0,
            h: 1.5,
            chartColors: ['00B050'],
            valAxisHidden: true,
            showPercent: true,
            showPercent: true,
            showValue: true,
            valGridLine: {
                style: 'none'
            },
            barDir: 'bar',
            dataLabelFontBold: true,
            dataLabelFontSize: 8,
            dataLabelColor: "000000",
            catAxisLabelFontSize: 6,
            dataLabelFormatCode: "#.0"
        });
        slidedelivery3.addText("(Shown as % of Respondents say YES)", {
            x: 2.0,
            y: 3.5,
            w: '100%',
            h: 0.5,
            fontSize: 7,
            color: '000000'
        });
        slidedelivery3.addText(
            `(Count-a(${data[8]['delivery_attrV'][0]}),b(${data[8]['delivery_attrV'][1]}),c(${data[8]['delivery_attrV'][2]}),d(${data[8]['delivery_attrV'][3]}),e(${data[8]['delivery_attrV'][4]}))`, {
                x: 3.0,
                y: 3.7,
                w: '100%',
                h: 0.5,
                fontSize: 7,
                color: '000000'
            });
        slideheart = pptx.addSlide();
        graphheart1 = [{
            name: "Host",
            labels: ["Host", "Host"],
            values: [data[9]['host'], 1000 - data[9]['host']],
        }];
        slideheart.addImage({
            x: 0.2,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/Hyundai2.png"
        });
        slideheart.addImage({
            x: 2.5,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/nlogo.png"
        });
        slideheart.addText(`Active Tab:HEART`, {
            x: 0.5,
            y: 0.4,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });
        slideheart.addText(`Applied Filter:${addText}`, {
            x: 0.5,
            y: 0.6,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });
        slideheart.addText("Host", {
            x: 1.8,
            y: 1.5,
            w: '100%',
            h: 0.5,
            fontSize: 14,
            color: '000000'
        });
        slideheart.addText(`${data[9]['host']}`, opts2);
        slideheart.addChart(pptx.charts.DOUGHNUT, graphheart1, optsChartPie1);
        slideheart.addText(
            "How would you rate the staff at dealership, right from parking, reception and the salesperson in terms of welcoming you?", {
                x: 1.2,
                y: 3.1,
                w: '30%',
                h: 0.5,
                fontSize: 7,
                color: '000000'
            });
        //slidehyundaiNPS = pptx.addSlide();
        graphheart2 = [{
            name: "Empathy",
            labels: ["Empathy", "Empathy"],
            values: [data[9]['empathy'], 1000 - data[9]['empathy']],
        }];
        slideheart.addText("Empathy", {
            x: 4.4,
            y: 1.5,
            w: '100%',
            h: 0.5,
            fontSize: 14,
            color: '000000'
        });
        slideheart.addText(`${data[9]['empathy']}`, {
            x: 4.8,
            y: 2.3,
            w: '100%',
            h: 0.5,
            fontSize: 15,
            color: '000000'
        });
        //slideheart.addText(`Base: ${base0}`, { x: 0.5, y: 1.0, w: '100%', h: 6.0, color: "006690",fontSize: 12, bold: true});

        slideheart.addChart(pptx.charts.DOUGHNUT, graphheart2, {
            x: 4.3,
            y: 1.8,
            w: 1.5,
            h: 1.5,
            chartColors: ["004D99", "E3E3E3"],
            dataBorder: {
                pt: "2",
                color: "F1F1F1"
            },
            dataLabelColor: "000000",
            dataLabelFontSize: 14,

            legendPos: "r",

            showLabel: false,
            showValue: false,
            showPercent: false,
            showLegend: false,
            showTitle: false,

            holeSize: 80,

            title: "Project Status",
            titleColor: "33CF22",
            titleFontFace: "Helvetica Neue",
            titleFontSize: 24
        });

        // slidedealerNPS = pptx.addSlide();
        slideheart.addText(
            "How would you rate the ability of salesperson in terms of understanding your requirement and responses as per your need", {
                x: 4.0,
                y: 3.1,
                w: '30%',
                h: 0.5,
                fontSize: 7,
                color: '000000'
            });
        graphheart3 = [{
            name: "Anticipate",
            labels: ["Anticipate", "Anticipate"],
            values: [data[9]['anticipate'], 1000 - data[9]['anticipate']],
        }];
        slideheart.addText("Anticipate", opts5);
        slideheart.addText(`${data[9]['anticipate']}`, opts6);
        //slideheart.addText(`Base: ${base0}`, { x: 0.5, y: 1.0, w: '100%', h: 6.0, color: "006690",fontSize: 12, bold: true});
        //slideheart.addText(addText, { x: 0.5, y: 1.5, w: '100%', h: 6.0, color: "006690",fontSize: 12,bold: true });
        slideheart.addChart(pptx.charts.DOUGHNUT, graphheart3, optsChartPie3);
        slideheart.addText(
            "How would you rate the salesperson for their guidance and recommendation provide the purchase process?", {
                x: 6.9,
                y: 3.1,
                w: '30%',
                h: 0.5,
                fontSize: 7,
                color: '000000'
            });
        // slidedealerPreference = pptx.addSlide();
        graphheart4 = [{
            name: "Respect",
            labels: ["Respect", "Respect"],
            values: [data[9]['respect'], 1000 - data[9]['respect']],
        }];
        slideheart.addText("Respect", {
            x: 1.7,
            y: 3.5,
            w: '100%',
            h: 0.5,
            fontSize: 14,
            color: '000000'
        });
        slideheart.addText(`${data[9]['respect']}`, opts8);
        //slideheart.addText(`Base: ${base0}`, { x: 0.5, y: 1.0, w: '100%', h: 6.0, color: "006690",fontSize: 12, bold: true});

        slideheart.addChart(pptx.charts.DOUGHNUT, graphheart4, optsChartPie4);
        slideheart.addText(
            "How would you rate the overall gesture of the staff at dealership in terms of assisting you with decision making during the purchase process?", {
                x: 1.4,
                y: 5.2,
                w: '30%',
                h: 0.5,
                fontSize: 7,
                color: '000000'
            });
        // slidehyundaiPreference = pptx.addSlide();
        graphheart5 = [{
            name: "Thanks",
            labels: ["Thanks", "Thanks"],
            values: [data[9]['thanks'], 1000 - data[9]['thanks']],
        }];
        slideheart.addText("Thanks", {
            x: 4.4,
            y: 3.5,
            w: '100%',
            h: 0.5,
            fontSize: 14,
            color: '000000'
        });
        slideheart.addText(`${data[9]['thanks']}`, {
            x: 4.8,
            y: 4.5,
            w: '100%',
            h: 0.5,
            fontSize: 15,
            color: '000000'
        });
        //slideheart.addText(`Base: ${base0}`, { x: 0.5, y: 1.0, w: '100%', h: 6.0, color: "006690",fontSize: 12, bold: true});
        //slideheart.addText(addText, { x: 0.5, y: 1.5, w: '100%', h: 6.0, color: "006690",fontSize: 12,bold: true });
        slideheart.addChart(pptx.charts.DOUGHNUT, graphheart5, {
            x: 4.3,
            y: 4.0,
            w: 1.5,
            h: 1.5,
            chartColors: ["004D99", "E3E3E3"],
            dataBorder: {
                pt: "2",
                color: "F1F1F1"
            },
            dataLabelColor: "000000",
            dataLabelFontSize: 14,

            legendPos: "r",

            showLabel: false,
            showValue: false,
            showPercent: false,
            showLegend: false,
            showTitle: false,

            holeSize: 80,

            title: "Project Status",
            titleColor: "33CF22",
            titleFontFace: "Helvetica Neue",
            titleFontSize: 24,
        });
        slideheart.addText(
            "How would you rate the overall gesture of the staff at dealership in terms of expressing gratitude and appreciating you?", {
                x: 4.3,
                y: 5.2,
                w: '30%',
                h: 0.5,
                fontSize: 7,
                color: '000000'
            });
        slidecustomer = pptx.addSlide();
        graphcustomer = [{
            name: "Customer Concern",
            labels: cat2.reverse(),
            values: val2.reverse()
        }];
        console.log(graphcustomer);
        slidecustomer.addImage({
            x: 0.2,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/Hyundai2.png"
        });
        slidecustomer.addImage({
            x: 2.5,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/nlogo.png"
        });
        slidecustomer.addText(`Active Tab:Customer Concern`, {
            x: 0.5,
            y: 0.4,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });
        slidecustomer.addText(`Applied Filter:${addText}`, {
            x: 0.5,
            y: 0.6,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });
        slidecustomer.addText("Customer Concern", {
            x: 0.0,
            y: 1.3,
            w: '100%',
            h: 0.5,
            align: 'center',
            fontSize: 14,
            color: '000000'
        });
        slidecustomer.addChart(pptx.charts.BAR, graphcustomer, {
            x: 1,
            y: 1.7,
            w: 8,
            h: 3,
            chartColors: ['FF9900'],
            valAxisHidden: true,
            showPercent: true,
            showPercent: true,
            showValue: true,
            valGridLine: {
                style: 'none'
            },
            barDir: 'bar',
            dataLabelFontBold: true,
            dataLabelFontSize: 8,
            dataLabelColor: "000000",
            catAxisLabelFontSize: 6,
            dataLabelFormatCode: "#.0"
        });



        slidecustomer2 = pptx.addSlide();
        graphcustomer00 = [{
            name: "Zone Wise SSI",
            labels: zonalSSILuciferPPTlabel,
            values: zonalSSILuciferPPTvalue.reverse()
        }];


        // graphcustomer2 = zonalNPSLuciferPPT;
        slidecustomer2.addImage({
            x: 0.2,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/Hyundai2.png"
        });
        slidecustomer2.addImage({
            x: 2.5,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/nlogo.png"
        });
        slidecustomer2.addText(`Active Tab:Zone Wise Performance`, {
            x: 0.5,
            y: 0.4,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });
        slidecustomer2.addText(`Applied Filter:${addText}`, {
            x: 0.5,
            y: 0.6,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });
        slidecustomer2.addText("Zone Wise SSI", {
            x: -3.0,
            y: 1.3,
            w: '100%',
            h: 0.5,
            align: 'center',
            fontSize: 14,
            color: '000000'
        });
        slidecustomer2.addChart(pptx.charts.BAR, graphcustomer00, {
            x: 1,
            y: 1.7,
            w: 4,
            h: 3,
            chartColors: ['004D99', '004D99', '004D99', '004D99', '004D99', 'A6A6A6'],
            valAxisHidden: true,
            showPercent: true,
            showPercent: true,
            showValue: true,
            valGridLine: {
                style: 'none'
            },
            barDir: 'bar',
            dataLabelFontBold: true,
            dataLabelFontSize: 8,
            dataLabelColor: "000000"
        });

        graphcustomer2 = [{
            name: "Zone Wse NPS",
            labels: zonalNPSLuciferPPTlabel.reverse(),
            values: zonalNPSLuciferPPTvalue.reverse()
        }];
        slidecustomer2.addText("Zone Wise NPS", {
            x: 3.0,
            y: 1.3,
            w: '100%',
            h: 0.5,
            align: 'center',
            fontSize: 14,
            color: '000000'
        });
        slidecustomer2.addChart(pptx.charts.BAR, graphcustomer2, {
            x: 6.0,
            y: 1.7,
            w: 4,
            h: 3,
            chartColors: ['004D99', '004D99', '004D99', '004D99', '004D99', 'A6A6A6'],
            valAxisHidden: true,
            showPercent: true,
            showPercent: true,
            showValue: true,
            valGridLine: {
                style: 'none'
            },
            barDir: 'bar',
            dataLabelFontBold: true,
            dataLabelFontSize: 8,
            dataLabelColor: "000000",
            dataLabelFormatCode: "#.0"
        });

        slidecustomer3 = pptx.addSlide();
        graphcustomer003 = [{
            name: "Region Wise SSI",
            labels: regionalSSILuciferPPTlabel,
            values: regionalSSILuciferPPTvalue.reverse()
        }];
        slidecustomer3.addImage({
            x: 0.2,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/Hyundai2.png"
        });
        slidecustomer3.addImage({
            x: 2.5,
            y: 0.2,
            w: '20%',
            h: 0.2,
            path: "assets/images/nlogo.png"
        });
        slidecustomer3.addText(`Active Tab:Region Wise Performance`, {
            x: 0.5,
            y: 0.4,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });
        slidecustomer3.addText(`Applied Filter:${addText}`, {
            x: 0.5,
            y: 0.6,
            w: '100%',
            h: 0.5,
            color: "006690",
            fontSize: 12,
            bold: true
        });
        slidecustomer3.addText("Region Wise SSI", {
            x: -3.0,
            y: 1.3,
            w: '100%',
            h: 0.5,
            align: 'center',
            fontSize: 14,
            color: '000000'
        });
        slidecustomer3.addChart(pptx.charts.BAR, graphcustomer003, {
            x: 1,
            y: 1.7,
            w: 4,
            h: 3,
            chartColors: ['004D99', '004D99', '004D99', '004D99', '004D99', '004D99', '004D99', '004D99',
                '004D99', '004D99', '004D99', '004D99', '004D99', '004D99', '004D99', '004D99', '004D99',
                'A6A6A6'
            ],
            valAxisHidden: true,
            showPercent: true,
            showPercent: true,
            showValue: true,
            valGridLine: {
                style: 'none'
            },
            barDir: 'bar',
            dataLabelFontBold: true,
            dataLabelFontSize: 8,
            dataLabelColor: "000000",
            catAxisLabelFontSize: 6
        });

        graphcustomer30 = [{
            name: "Zone Wse NPS",
            labels: regionalNPSLuciferPPTlabel.reverse(),
            values: regionalNPSLuciferPPTvalue.reverse()
        }];
        slidecustomer3.addText("Region Wise NPS", {
            x: 3.0,
            y: 1.3,
            w: '100%',
            h: 0.5,
            align: 'center',
            fontSize: 14,
            color: '000000'
        });
        slidecustomer3.addChart(pptx.charts.BAR, graphcustomer30, {
            x: 6.0,
            y: 1.7,
            w: 4,
            h: 3,
            chartColors: ['004D99', '004D99', '004D99', '004D99', '004D99', '004D99', '004D99', '004D99',
                '004D99', '004D99', '004D99', '004D99', '004D99', '004D99', '004D99', '004D99', '004D99',
                'A6A6A6'
            ],
            valAxisHidden: true,
            showPercent: true,
            showPercent: true,
            showValue: true,
            valGridLine: {
                style: 'none'
            },
            barDir: 'bar',
            dataLabelFontBold: true,
            dataLabelFontSize: 8,
            dataLabelColor: "000000",
            dataLabelFormatCode: "#.0",
            catAxisLabelFontSize: 6
        });


        var cityLengthY = $("#city option:selected").length;
        var stateLengthY = $("#state option:selected").length;
        var zoneLengthY = $("#zone option:selected").length;
        var regionLengthY = $("#region option:selected").length;
        var maindealerVal = $('#maindealer').val();
        var dealerVal = $('#dealer').val();

        if (zoneLengthY == 0) {
            let barb1a = {
                x: 1,
                y: 1.5,
                w: 8,
                h: 3,
                chartColors: ['b4c7e7'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                dataLabelFormatCode: "#.0",
                valAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };

            let optb1a = {
                x: 0.0,
                y: 1.3,
                w: '100%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };

            slidebench = pptx.addSlide();
            graphbench1 = [{
                name: "All India",
                labels: ["Hyundai NPS", "Dealer NPS", "SSI"],
                values: benchindianpsPPT,
            }];
            slidebench.addImage({
                x: 0.2,
                y: 0.2,
                w: '20%',
                h: 0.2,
                path: "assets/images/Hyundai2.png"
            });
            slidebench.addImage({
                x: 2.5,
                y: 0.2,
                w: '20%',
                h: 0.2,
                path: "assets/images/nlogo.png"
            });
            slidebench.addText(`Active Tab:Benchmark`, {
                x: 0.5,
                y: 0.4,
                w: '100%',
                h: 0.5,
                color: "006690",
                fontSize: 12,
                bold: true
            });
            slidebench.addText(`Applied Filter:${addText}`, {
                x: 0.5,
                y: 0.6,
                w: '100%',
                h: 0.5,
                color: "006690",
                fontSize: 12,
                bold: true
            });
            slidebench.addText("All India", optb1a);
            slidebench.addChart(pptx.charts.BAR, graphbench1, barb1a);

            //     slidebenchfactor = pptx.addSlide();
            //     graphbenchfactor1 = [{
            // 			name: "All India",
            // 			labels: ["Digitization","Facility Diagnostics","Sales Consultant","Deal Diagnostics","Paperwork Diagnostics","Delivery Process Diagnostics"].reverse(),
            // 			values: benchindiafactorPPT.reverse(),
            // 		}];
            //     slidebenchfactor.addImage({x: 0.2, y: 0.2, w: '20%', h: 0.2,path: "assets/images/Hyundai2.png"});
            //     slidebenchfactor.addImage({x: 2.5, y: 0.2, w: '20%', h: 0.2,path: "assets/images/nlogo.png"});
            //     slidebenchfactor.addText(`Active Tab:Benchmark`,{ x: 0.5, y: 0.4, w: '100%', h: 0.5, color: "006690",fontSize: 12,bold: true });
            //     slidebenchfactor.addText(`Applied Filter:${addText}`,{ x: 0.5, y: 0.6, w: '100%', h: 0.5, color: "006690",fontSize: 12,bold: true });
            //     slidebenchfactor.addText("All India", opts);
            //     slidebenchfactor.addChart(pptx.charts.BAR, graphbenchfactor1, { x:0.2, y: 2.0, w: 3.0, h: 1.5,chartColors:['004D99'], valAxisHidden:true, showPercent:true, showPercent: true, showValue: true, valGridLine:{style: 'none'},barDir:'bar',dataLabelFontBold:true,dataLabelFontSize:8,dataLabelColor: "000000"});


            let slide28;
            let optb1a71 = {
                x: 0.5,
                y: 1.3,
                w: '100%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };

            let barb1a71 = {
                x: 1,
                y: 1.5,
                w: 8,
                h: 3,
                chartColors: ['b4c7e7'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },

                valAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };

            ov171 = [{
                name: "All India",
                labels: ["Digitization", "Facility Diagnostics", "Sales Consultant", "Deal Diagnostics",
                    "Paperwork Diagnostics", "Delivery Process Diagnostics"
                ].reverse(),
                values: benchindiafactorPPT.reverse(),
            }];

            slide28 = pptx.addSlide();

            slide28.addImage({
                x: 0.2,
                y: 0.2,
                w: '20%',
                h: 0.2,
                path: "assets/images/Hyundai2.png"
            });
            slide28.addImage({
                x: 2.5,
                y: 0.2,
                w: '20%',
                h: 0.2,
                path: "assets/images/nlogo.png"
            });
            slide28.addText(`Active Tab:Benchmark`, {
                x: 0.5,
                y: 0.4,
                w: '100%',
                h: 0.5,
                color: "006690",
                fontSize: 12,
                bold: true
            });
            slide28.addText(`Applied Filter:${addText}`, {
                x: 0.5,
                y: 0.6,
                w: '100%',
                h: 0.5,
                color: "006690",
                fontSize: 12,
                bold: true
            });
            slide28.addText("All India", optb1a71);
            slide28.addChart(pptx.charts.BAR, ov171, barb1a71);
        }


        if (zoneLengthY != 0 && regionLengthY == 0) {
            let slide27;
            let optb1a = {
                x: 0.8,
                y: 1.3,
                w: '40%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };
            let optb1b = {
                x: 3.8,
                y: 1.3,
                w: '40%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };

            let barb1a = {
                x: 0.8,
                y: 3.5,
                w: 4,
                h: 2,
                chartColors: ['b4c7e7'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                dataLabelFormatCode: "#.0",
                valAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };
            let barb1aa = {
                x: 0.8,
                y: 1.5,
                w: 4,
                h: 2,
                chartColors: ['b4c7e7'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };

            let barb1b = {
                x: 5,
                y: 3.5,
                w: 4,
                h: 2,
                chartColors: ['0000ff'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                dataLabelFormatCode: "#.0",
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };
            let barb1bb = {
                x: 5,
                y: 1.5,
                w: 4,
                h: 2,
                chartColors: ['0000ff'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                dataLabelFormatCode: "#.0",
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };

            let ov1 = [{
                name: "All India",
                labels: ['Hyundai Nps', 'Dealer Nps'],
                values: [benchindianpsPPT[0], benchindianpsPPT[1]],
            }];
            let ov1a = [{
                name: "All India",
                labels: ['SSI Score'],
                values: [benchindianpsPPT[2]],
            }];

            graphbench2 = [{
                name: "Zone",
                labels: ["Hyundai NPS", "Dealer NPS"],
                values: [benchzonenpsPPT[0], benchzonenpsPPT[1]],
            }];
            let graphbench2a = [{
                name: "Zone",
                labels: ['SSI Score'],
                values: [benchzonenpsPPT[2]],
            }];

            slide27 = pptx.addSlide();

            slide27.addImage({
                x: 0.2,
                y: 0.2,
                w: '20%',
                h: 0.2,
                path: "assets/images/Hyundai2.png"
            });
            slide27.addImage({
                x: 2.5,
                y: 0.2,
                w: '20%',
                h: 0.2,
                path: "assets/images/nlogo.png"
            });
            slide27.addText(`Active Tab:Benchmark`, {
                x: 0.5,
                y: 0.4,
                w: '100%',
                h: 0.5,
                color: "006690",
                fontSize: 12,
                bold: true
            });
            slide27.addText(`Applied Filter:${addText}`, {
                x: 0.5,
                y: 0.6,
                w: '100%',
                h: 0.5,
                color: "006690",
                fontSize: 12,
                bold: true
            });
            slide27.addText("All India", optb1a);
            slide27.addChart(pptx.charts.BAR, ov1, barb1a);
            slide27.addChart(pptx.charts.BAR, ov1a, barb1aa);
            slide27.addText("Zone", optb1b);
            slide27.addChart(pptx.charts.BAR, graphbench2, barb1b);
            slide27.addChart(pptx.charts.BAR, graphbench2a, barb1bb);


            let slide28;
            let optb1a71 = {
                x: 0.3,
                y: 1.3,
                w: '40%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };
            let optb1b71 = {
                x: 3.8,
                y: 1.3,
                w: '40%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };

            let barb1a71 = {
                x: 1,
                y: 1.5,
                w: 4,
                h: 2,
                chartColors: ['b4c7e7'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };


            let barb1b71 = {
                x: 5,
                y: 1.5,
                w: 4,
                h: 2,
                chartColors: ['0000ff'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };


            ov171 = [{
                name: "All India",
                labels: ["Digitization", "Facility Diagnostics", "Sales Consultant", "Deal Diagnostics",
                    "Paperwork Diagnostics", "Delivery Process Diagnostics"
                ].reverse(),
                values: benchindiafactorPPT.reverse(),
            }];


            ov271 = [{
                name: "All India",
                labels: ["Digitization", "Facility Diagnostics", "Sales Consultant", "Deal Diagnostics",
                    "Paperwork Diagnostics", "Delivery Process Diagnostics"
                ].reverse(),
                values: benchzonefactorPPT.reverse(),
            }];

            slide28 = pptx.addSlide();

            slide28.addImage({
                x: 0.2,
                y: 0.2,
                w: '20%',
                h: 0.2,
                path: "assets/images/Hyundai2.png"
            });
            slide28.addImage({
                x: 2.5,
                y: 0.2,
                w: '20%',
                h: 0.2,
                path: "assets/images/nlogo.png"
            });
            slide28.addText(`Active Tab:Benchmark`, {
                x: 0.5,
                y: 0.4,
                w: '100%',
                h: 0.5,
                color: "006690",
                fontSize: 12,
                bold: true
            });
            slide28.addText(`Applied Filter:${addText}`, {
                x: 0.5,
                y: 0.6,
                w: '100%',
                h: 0.5,
                color: "006690",
                fontSize: 12,
                bold: true
            });
            slide28.addText("All India", optb1a71);
            slide28.addChart(pptx.charts.BAR, ov171, barb1a71);
            slide28.addText("Zone", optb1b71);
            slide28.addChart(pptx.charts.BAR, ov271, barb1b71);
        }

        if (regionLengthY != 0 && maindealerVal == 0 && stateLengthY == 0) {
            let slide27;
            let optb1a = {
                x: 0.0,
                y: 1.3,
                w: '30%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };
            let optb1b = {
                x: 2.7,
                y: 1.3,
                w: '30%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };
            let optb1c = {
                x: 5.0,
                y: 1.3,
                w: '30%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };

            let barb1a = {
                x: 1,
                y: 3.5,
                w: 2.5,
                h: 2,
                chartColors: ['b4c7e7'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                dataLabelFormatCode: "#.0",
                valAxisHidden: true,

                showPercent: false,
                showLegend: false,
                showTitle: false,

            };
            let barb1aa = {
                x: 1,
                y: 1.5,
                w: 2,
                h: 2,
                chartColors: ['b4c7e7'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,

                showPercent: false,
                showLegend: false,
                showTitle: false,

            };

            let barb1b = {
                x: 3.5,
                y: 3.5,
                w: 2.5,
                h: 2,
                chartColors: ['0000ff'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                dataLabelFormatCode: "#.0",
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };
            let barb1bb = {
                x: 3.5,
                y: 1.5,
                w: 2,
                h: 2,
                chartColors: ['0000ff'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };

            let barb1c = {
                x: 5.9,
                y: 3.5,
                w: 2.5,
                h: 2,
                chartColors: ['a5a5a5'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                dataLabelFormatCode: "#.0",
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };
            let barb1cc = {
                x: 5.9,
                y: 1.5,
                w: 2,
                h: 2,
                chartColors: ['a5a5a5'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };

            let ov1 = [{
                name: "All India",
                labels: ['Hyundai Nps', 'Dealer Nps'],
                values: [benchindianpsPPT[0], benchindianpsPPT[1]],
            }];
            let ov1a = [{
                name: "All India",
                labels: ['SSI Score'],
                values: [benchindianpsPPT[2]],
            }];

            graphbench2 = [{
                name: "Zone",
                labels: ["Hyundai NPS", "Dealer NPS"],
                values: [benchzonenpsPPT[0], benchzonenpsPPT[1]],
            }];
            let graphbench2a = [{
                name: "Zone",
                labels: ['SSI Score'],
                values: [benchzonenpsPPT[2]],
            }];
            let ov3 = [{
                name: "Region",
                labels: ['Hyundai Nps', 'Dealer Nps'],
                values: [benchregionnpsPPT[0], benchregionnpsPPT[1]],
            }];
            let ov3a = [{
                name: "Region",
                labels: ['SSI Score'],
                values: [benchregionnpsPPT[2]],
            }];

            slide27 = pptx.addSlide();

            slide27.addImage({
                x: 0.2,
                y: 0.2,
                w: '20%',
                h: 0.2,
                path: "assets/images/Hyundai2.png"
            });
            slide27.addImage({
                x: 2.5,
                y: 0.2,
                w: '20%',
                h: 0.2,
                path: "assets/images/nlogo.png"
            });
            slide27.addText(`Active Tab:Benchmark`, {
                x: 0.5,
                y: 0.4,
                w: '100%',
                h: 0.5,
                color: "006690",
                fontSize: 12,
                bold: true
            });
            slide27.addText(`Applied Filter:${addText}`, {
                x: 0.5,
                y: 0.6,
                w: '100%',
                h: 0.5,
                color: "006690",
                fontSize: 12,
                bold: true
            });
            slide27.addText("All India", optb1a);
            slide27.addChart(pptx.charts.BAR, ov1, barb1a);
            slide27.addChart(pptx.charts.BAR, ov1a, barb1aa);
            slide27.addText("Zone", optb1b);
            slide27.addChart(pptx.charts.BAR, graphbench2, barb1b);
            slide27.addChart(pptx.charts.BAR, graphbench2a, barb1bb);
            slide27.addText("Region", optb1c);
            slide27.addChart(pptx.charts.BAR, ov3, barb1c);
            slide27.addChart(pptx.charts.BAR, ov3a, barb1cc);

            let slide28;
            let optb1a71 = {
                x: 0.5,
                y: 1.3,
                w: '30%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };
            let optb1b71 = {
                x: 2.9,
                y: 1.3,
                w: '30%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };
            let optb1c71 = {
                x: 4.9,
                y: 1.3,
                w: '30%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };

            let barb1a71 = {
                x: 1,
                y: 1.5,
                w: 2.5,
                h: 2,
                chartColors: ['b4c7e7'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,

                showPercent: false,
                showLegend: false,
                showTitle: false,

            };


            let barb1b71 = {
                x: 3.5,
                y: 1.5,
                w: 2.5,
                h: 2,
                chartColors: ['0000ff'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };


            let barb1c71 = {
                x: 5.9,
                y: 1.5,
                w: 2.5,
                h: 2,
                chartColors: ['a5a5a5'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };

            ov171 = [{
                name: "All India",
                labels: ["Digitization", "Facility Diagnostics", "Sales Consultant", "Deal Diagnostics",
                    "Paperwork Diagnostics", "Delivery Process Diagnostics"
                ].reverse(),
                values: benchindiafactorPPT.reverse(),
            }];


            ov271 = [{
                name: "Zone",
                labels: ["Digitization", "Facility Diagnostics", "Sales Consultant", "Deal Diagnostics",
                    "Paperwork Diagnostics", "Delivery Process Diagnostics"
                ].reverse(),
                values: benchzonefactorPPT.reverse(),
            }];
            ov371 = [{
                name: "Region",
                labels: ["Digitization", "Facility Diagnostics", "Sales Consultant", "Deal Diagnostics",
                    "Paperwork Diagnostics", "Delivery Process Diagnostics"
                ].reverse(),
                values: benchregionfactorPPT.reverse(),
            }];

            slide28 = pptx.addSlide();

            slide28.addImage({
                x: 0.2,
                y: 0.2,
                w: '20%',
                h: 0.2,
                path: "assets/images/Hyundai2.png"
            });
            slide28.addImage({
                x: 2.5,
                y: 0.2,
                w: '20%',
                h: 0.2,
                path: "assets/images/nlogo.png"
            });
            slide28.addText(`Active Tab:Benchmark`, {
                x: 0.5,
                y: 0.4,
                w: '100%',
                h: 0.5,
                color: "006690",
                fontSize: 12,
                bold: true
            });
            slide28.addText(`Applied Filter:${addText}`, {
                x: 0.5,
                y: 0.6,
                w: '100%',
                h: 0.5,
                color: "006690",
                fontSize: 12,
                bold: true
            });
            slide28.addText("All India", optb1a71);
            slide28.addChart(pptx.charts.BAR, ov171, barb1a71);
            slide28.addText("Zone", optb1b71);
            slide28.addChart(pptx.charts.BAR, ov271, barb1b71);
            slide28.addText("Region", optb1c71);
            slide28.addChart(pptx.charts.BAR, ov371, barb1c71);
        }
        if (maindealerVal != 0 && dealerVal == 0) {
            let optb1a = {
                x: 0.0,
                y: 1.3,
                w: '25%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };
            let optb1b = {
                x: 2.0,
                y: 1.3,
                w: '25%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };
            let optb1c = {
                x: 4.3,
                y: 1.3,
                w: '25%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };
            let optb1d = {
                x: 6.3,
                y: 1.3,
                w: '25%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };

            let barb1a = {
                x: 0.2,
                y: 3.5,
                w: 2.5,
                h: 2,
                chartColors: ['b4c7e7'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                dataLabelFormatCode: "#.0",
                valAxisHidden: true,

                showPercent: false,
                showLegend: false,
                showTitle: false,

            };
            let barb1aa = {
                x: 0.2,
                y: 1.5,
                w: 2,
                h: 2,
                chartColors: ['b4c7e7'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,

                showPercent: false,
                showLegend: false,
                showTitle: false,

            };

            let barb1b = {
                x: 2.8,
                y: 3.5,
                w: 2.5,
                h: 2,
                chartColors: ['0000ff'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                dataLabelFormatCode: "#.0",
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };
            let barb1bb = {
                x: 2.8,
                y: 1.5,
                w: 2,
                h: 2,
                chartColors: ['0000ff'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };

            let barb1c = {
                x: 4.9,
                y: 3.5,
                w: 2.3,
                h: 2,
                chartColors: ['a5a5a5'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                dataLabelFormatCode: "#.0",
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };
            let barb1cc = {
                x: 4.9,
                y: 1.5,
                w: 2,
                h: 2,
                chartColors: ['a5a5a5'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };

            let barb1d = {
                x: 6.7,
                y: 3.5,
                w: 2.3,
                h: 2,
                chartColors: ['002a5c'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                dataLabelFormatCode: "#.0",
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };

            let barb1dd = {
                x: 6.7,
                y: 1.5,
                w: 2,
                h: 2,
                chartColors: ['002a5c'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };

            <?php 
                                    if($_SESSION['user_type']==1)
                                    {
                                ?>

            let ov1X = [{
                name: "All India",
                labels: ['Hyundai Nps', 'Dealer Nps'],
                values: [benchindianpsPPT[0], benchindianpsPPT[1]],
            }];
            let ov1aX = [{
                name: "All India",
                labels: ['SSI Score'],
                values: [benchindianpsPPT[2]],
            }];

            graphbench2X = [{
                name: "Zone",
                labels: ["Hyundai NPS", "Dealer NPS"],
                values: [benchzonenpsPPT[0], benchzonenpsPPT[1]],
            }];
            let graphbench2aX = [{
                name: "Zone",
                labels: ['SSI Score'],
                values: [benchzonenpsPPT[2]],
            }];
            let ov3X = [{
                name: "Region",
                labels: ['Hyundai Nps', 'Dealer Nps'],
                values: [benchregionnpsPPT[0], benchregionnpsPPT[1]],
            }];
            let ov3aX = [{
                name: "Region",
                labels: ['SSI Score'],
                values: [benchregionnpsPPT[2]],
            }];
            let ov4X = [{
                name: "Main Dealer",
                labels: ['Hyundai Nps', 'Dealer Nps'],
                values: [benchdealernpsPPT[0], benchdealernpsPPT[1]],
            }];
            let ov4aX = [{
                name: "Main Dealer",
                labels: ['SSI Performance Index'],
                values: [benchdealernpsPPT[2]],
            }];

            slide27 = pptx.addSlide();

            slide27.addImage({
                x: 0.2,
                y: 0.2,
                w: '20%',
                h: 0.2,
                path: "assets/images/Hyundai2.png"
            });
            slide27.addImage({
                x: 2.5,
                y: 0.2,
                w: '20%',
                h: 0.2,
                path: "assets/images/nlogo.png"
            });
            slide27.addText(`Active Tab:Benchmark`, {
                x: 0.5,
                y: 0.4,
                w: '100%',
                h: 0.5,
                color: "006690",
                fontSize: 12,
                bold: true
            });
            slide27.addText(`Applied Filter:${addText}`, {
                x: 0.5,
                y: 0.6,
                w: '100%',
                h: 0.5,
                color: "006690",
                fontSize: 12,
                bold: true
            });
            slide27.addText("All India", optb1a);
            slide27.addChart(pptx.charts.BAR, ov1X, barb1a);
            slide27.addChart(pptx.charts.BAR, ov1aX, barb1aa);
            slide27.addText("Zone", optb1b);
            slide27.addChart(pptx.charts.BAR, graphbench2X, barb1b);
            slide27.addChart(pptx.charts.BAR, graphbench2aX, barb1bb);
            slide27.addText("Region", optb1c);
            slide27.addChart(pptx.charts.BAR, ov3X, barb1c);
            slide27.addChart(pptx.charts.BAR, ov3aX, barb1cc);
            slide27.addText("Main Dealer", optb1d);
            slide27.addChart(pptx.charts.BAR, ov4X, barb1d);
            slide27.addChart(pptx.charts.BAR, ov4aX, barb1dd);

            <?php
                                    };
                                ?>

            let ov1 = [{
                name: "All India",
                labels: ['Dealer Nps'],
                values: [benchindianpsPPT[0]],
            }];
            let ov1a = [{
                name: "All India",
                labels: ['SSI Score'],
                values: [benchindianpsPPT[1]],
            }];

            graphbench2 = [{
                name: "Zone",
                labels: ["Dealer NPS"],
                values: [benchzonenpsPPT[0]],
            }];
            let graphbench2a = [{
                name: "Zone",
                labels: ['SSI Score'],
                values: [benchzonenpsPPT[1]],
            }];
            let ov3 = [{
                name: "Region",
                labels: ['Dealer Nps'],
                values: [benchregionnpsPPT[0]],
            }];
            let ov3a = [{
                name: "Region",
                labels: ['SSI Score'],
                values: [benchregionnpsPPT[1]],
            }];
            let ov4 = [{
                name: "Main Dealer",
                labels: ['Dealer Nps'],
                values: [benchdealernpsPPT[0]],
            }];
            let ov4a = [{
                name: "Main Dealer",
                labels: ['SSI Performance Index'],
                values: [benchdealernpsPPT[1]],
            }];

            slide27 = pptx.addSlide();

            slide27.addImage({
                x: 0.2,
                y: 0.2,
                w: '20%',
                h: 0.2,
                path: "assets/images/Hyundai2.png"
            });
            slide27.addImage({
                x: 2.5,
                y: 0.2,
                w: '20%',
                h: 0.2,
                path: "assets/images/nlogo.png"
            });
            slide27.addText(`Active Tab:Benchmark`, {
                x: 0.5,
                y: 0.4,
                w: '100%',
                h: 0.5,
                color: "006690",
                fontSize: 12,
                bold: true
            });
            slide27.addText(`Applied Filter:${addText}`, {
                x: 0.5,
                y: 0.6,
                w: '100%',
                h: 0.5,
                color: "006690",
                fontSize: 12,
                bold: true
            });
            slide27.addText("All India", optb1a);
            slide27.addChart(pptx.charts.BAR, ov1, barb1a);
            slide27.addChart(pptx.charts.BAR, ov1a, barb1aa);
            slide27.addText("Zone", optb1b);
            slide27.addChart(pptx.charts.BAR, graphbench2, barb1b);
            slide27.addChart(pptx.charts.BAR, graphbench2a, barb1bb);
            slide27.addText("Region", optb1c);
            slide27.addChart(pptx.charts.BAR, ov3, barb1c);
            slide27.addChart(pptx.charts.BAR, ov3a, barb1cc);
            slide27.addText("Main Dealer", optb1d);
            slide27.addChart(pptx.charts.BAR, ov4, barb1d);
            slide27.addChart(pptx.charts.BAR, ov4a, barb1dd);

            let slide28;
            let optb1a71 = {
                x: 0.0,
                y: 1.3,
                w: '25%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };
            let optb1b71 = {
                x: 2.3,
                y: 1.3,
                w: '25%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };
            let optb1c71 = {
                x: 4.3,
                y: 1.3,
                w: '25%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };
            let optb1d71 = {
                x: 6.0,
                y: 1.3,
                w: '25%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };

            let barb1a71 = {
                x: 0.2,
                y: 1.5,
                w: 2.5,
                h: 2,
                chartColors: ['b4c7e7'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,

                showPercent: false,
                showLegend: false,
                showTitle: false,

            };


            let barb1b71 = {
                x: 2.8,
                y: 1.5,
                w: 2.5,
                h: 2,
                chartColors: ['0000ff'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };


            let barb1c71 = {
                x: 4.9,
                y: 1.5,
                w: 2.5,
                h: 2,
                chartColors: ['a5a5a5'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };


            let barb1d71 = {
                x: 6.7,
                y: 1.5,
                w: 2.5,
                h: 2,
                chartColors: ['002a5c'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };



            ov171 = [{
                name: "All India",
                labels: ["Digitization", "Facility Diagnostics", "Sales Consultant", "Deal Diagnostics",
                    "Paperwork Diagnostics", "Delivery Process Diagnostics"
                ].reverse(),
                values: benchindiafactorPPT.reverse(),
            }];


            ov271 = [{
                name: "Zone",
                labels: ["Digitization", "Facility Diagnostics", "Sales Consultant", "Deal Diagnostics",
                    "Paperwork Diagnostics", "Delivery Process Diagnostics"
                ].reverse(),
                values: benchzonefactorPPT.reverse(),
            }];
            ov371 = [{
                name: "Region",
                labels: ["Digitization", "Facility Diagnostics", "Sales Consultant", "Deal Diagnostics",
                    "Paperwork Diagnostics", "Delivery Process Diagnostics"
                ].reverse(),
                values: benchregionfactorPPT.reverse(),
            }];
            let ov471 = [{
                name: "Main Dealer",
                labels: ["Digitization", "Facility Diagnostics", "Sales Consultant", "Deal Diagnostics",
                    "Paperwork Diagnostics", "Delivery Process Diagnostics"
                ].reverse(),
                values: benchdealerfactorPPT.reverse(),
            }];

            slide28 = pptx.addSlide();

            slide28.addImage({
                x: 0.2,
                y: 0.2,
                w: '20%',
                h: 0.2,
                path: "assets/images/Hyundai2.png"
            });
            slide28.addImage({
                x: 2.5,
                y: 0.2,
                w: '20%',
                h: 0.2,
                path: "assets/images/nlogo.png"
            });
            slide28.addText(`Active Tab:Benchmark`, {
                x: 0.5,
                y: 0.4,
                w: '100%',
                h: 0.5,
                color: "006690",
                fontSize: 12,
                bold: true
            });
            slide28.addText(`Applied Filter:${addText}`, {
                x: 0.5,
                y: 0.6,
                w: '100%',
                h: 0.5,
                color: "006690",
                fontSize: 12,
                bold: true
            });
            slide28.addText("All India", optb1a71);
            slide28.addChart(pptx.charts.BAR, ov171, barb1a71);
            slide28.addText("Zone", optb1b71);
            slide28.addChart(pptx.charts.BAR, ov271, barb1b71);
            slide28.addText("Region", optb1c71);
            slide28.addChart(pptx.charts.BAR, ov371, barb1c71);
            slide28.addText("Main Dealer", optb1d71);
            slide28.addChart(pptx.charts.BAR, ov471, barb1d71);
        }
        if (dealerVal != 0 && stateLengthY == 0) {
            let slide27;
            let optb1a = {
                x: 0.3,
                y: 1.3,
                w: '25%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };
            let optb1b = {
                x: 2.5,
                y: 1.3,
                w: '15%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };
            let optb1c = {
                x: 4.2,
                y: 1.3,
                w: '15%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };
            let optb1d = {
                x: 5.8,
                y: 1.3,
                w: '15%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };
            let optb1e = {
                x: 7.6,
                y: 1.3,
                w: '15%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };

            let barb1a = {
                x: 0.3,
                y: 3.5,
                w: 2,
                h: 2,
                chartColors: ['b4c7e7'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                dataLabelFormatCode: "#.0",
                valAxisHidden: true,

                showPercent: false,
                showLegend: false,
                showTitle: false,

            };
            let barb1aa = {
                x: 0.2,
                y: 1.5,
                w: 2,
                h: 2,
                chartColors: ['b4c7e7'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,

                showPercent: false,
                showLegend: false,
                showTitle: false,

            };

            let barb1b = {
                x: 2.8,
                y: 3.5,
                w: 1.5,
                h: 2,
                chartColors: ['0000ff'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                dataLabelFormatCode: "#.0",
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };
            let barb1bb = {
                x: 2.8,
                y: 1.5,
                w: 1.5,
                h: 2,
                chartColors: ['0000ff'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };

            let barb1c = {
                x: 4.7,
                y: 3.5,
                w: 1.5,
                h: 2,
                chartColors: ['a5a5a5'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                dataLabelFormatCode: "#.0",
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };
            let barb1cc = {
                x: 4.7,
                y: 1.5,
                w: 1.5,
                h: 2,
                chartColors: ['a5a5a5'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };

            let barb1d = {
                x: 6.5,
                y: 3.5,
                w: 1.5,
                h: 2,
                chartColors: ['002a5c'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                dataLabelFormatCode: "#.0",
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };

            let barb1dd = {
                x: 6.5,
                y: 1.5,
                w: 1.5,
                h: 2,
                chartColors: ['002a5c'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };
            let barb1e = {
                x: 8.0,
                y: 3.5,
                w: 1.5,
                h: 2,
                chartColors: ['002a5c'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                dataLabelFormatCode: "#.0",
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };
            let barb1ee = {
                x: 8.0,
                y: 1.5,
                w: 1.5,
                h: 2,
                chartColors: ['002a5c'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };

            let ov1 = [{
                name: "All India",
                labels: ['Hyundai Nps', 'Dealer Nps'],
                values: [benchindianpsPPT[0], benchindianpsPPT[1]],
            }];
            let ov1a = [{
                name: "All India",
                labels: ['SSI Score'],
                values: [benchindianpsPPT[2]],
            }];

            graphbench2 = [{
                name: "Zone",
                labels: ["Hyundai NPS", "Dealer NPS"],
                values: [benchzonenpsPPT[0], benchzonenpsPPT[1]],
            }];
            let graphbench2a = [{
                name: "Zone",
                labels: ['SSI Score'],
                values: [benchzonenpsPPT[2]],
            }];
            let ov3 = [{
                name: "Region",
                labels: ['Hyundai Nps', 'Dealer Nps'],
                values: [benchregionnpsPPT[0], benchregionnpsPPT[1]],
            }];
            let ov3a = [{
                name: "Region",
                labels: ['SSI Score'],
                values: [benchregionnpsPPT[2]],
            }];
            let ov4 = [{
                name: "Main Dealer",
                labels: ['Hyundai Nps', 'Dealer Nps'],
                values: [benchdealernpsPPT[0], benchdealernpsPPT[1]],
            }];
            let ov4a = [{
                name: "Main Dealer",
                labels: ['SSI Performance Index'],
                values: [benchdealernpsPPT[2]],
            }];
            let ov5 = [{
                name: "Dealer",
                labels: ['Hyundai Nps', 'Dealer Nps'],
                values: [benchsubdealernpsPPT[0], benchsubdealernpsPPT[1]],
            }];
            let ov5a = [{
                name: "Dealer",
                labels: ['SSI Performance Index'],
                values: [benchsubdealernpsPPT[2]],
            }];

            slide27 = pptx.addSlide();

            slide27.addImage({
                x: 0.2,
                y: 0.2,
                w: '20%',
                h: 0.2,
                path: "assets/images/Hyundai2.png"
            });
            slide27.addImage({
                x: 2.5,
                y: 0.2,
                w: '20%',
                h: 0.2,
                path: "assets/images/nlogo.png"
            });
            slide27.addText(`Active Tab:Benchmark`, {
                x: 0.5,
                y: 0.4,
                w: '100%',
                h: 0.5,
                color: "006690",
                fontSize: 12,
                bold: true
            });
            slide27.addText(`Applied Filter:${addText}`, {
                x: 0.5,
                y: 0.6,
                w: '100%',
                h: 0.5,
                color: "006690",
                fontSize: 12,
                bold: true
            });
            slide27.addText("All India", optb1a);
            slide27.addChart(pptx.charts.BAR, ov1, barb1a);
            slide27.addChart(pptx.charts.BAR, ov1a, barb1aa);
            slide27.addText("Zone", optb1b);
            slide27.addChart(pptx.charts.BAR, graphbench2, barb1b);
            slide27.addChart(pptx.charts.BAR, graphbench2a, barb1bb);
            slide27.addText("Region", optb1c);
            slide27.addChart(pptx.charts.BAR, ov3, barb1c);
            slide27.addChart(pptx.charts.BAR, ov3a, barb1cc);
            slide27.addText("Main Dealer", optb1d);
            slide27.addChart(pptx.charts.BAR, ov4, barb1d);
            slide27.addChart(pptx.charts.BAR, ov4a, barb1dd);
            slide27.addText("Dealer", optb1e);
            slide27.addChart(pptx.charts.BAR, ov5, barb1e);
            slide27.addChart(pptx.charts.BAR, ov5a, barb1ee);


            let slide28;
            let optb1a71 = {
                x: 0.0,
                y: 1.3,
                w: '40%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };
            let optb1b71 = {
                x: 3.0,
                y: 1.3,
                w: '15%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };
            let optb1c71 = {
                x: 4.4,
                y: 1.3,
                w: '15%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };
            let optb1d71 = {
                x: 5.6,
                y: 1.3,
                w: '15%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };
            let optb1e71 = {
                x: 7.4,
                y: 1.3,
                w: '15%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };

            let barb1a71 = {
                x: 0.2,
                y: 1.5,
                w: 3,
                h: 2,
                chartColors: ['b4c7e7'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,

                showPercent: false,
                showLegend: false,
                showTitle: false,

            };


            let barb1b71 = {
                x: 3.1,
                y: 1.5,
                w: 1.5,
                h: 2,
                chartColors: ['0000ff'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };


            let barb1c71 = {
                x: 4.7,
                y: 1.5,
                w: 1.5,
                h: 2,
                chartColors: ['a5a5a5'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };


            let barb1d71 = {
                x: 6.3,
                y: 1.5,
                w: 1.5,
                h: 2,
                chartColors: ['002a5c'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };


            let barb1e71 = {
                x: 8.0,
                y: 1.5,
                w: 1.5,
                h: 2,
                chartColors: ['002a5c'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };


            ov171 = [{
                name: "All India",
                labels: ["Digitization", "Facility Diagnostics", "Sales Consultant", "Deal Diagnostics",
                    "Paperwork Diagnostics", "Delivery Process Diagnostics"
                ].reverse(),
                values: benchindiafactorPPT.reverse(),
            }];


            ov271 = [{
                name: "Zone",
                labels: ["Digitization", "Facility Diagnostics", "Sales Consultant", "Deal Diagnostics",
                    "Paperwork Diagnostics", "Delivery Process Diagnostics"
                ].reverse(),
                values: benchzonefactorPPT.reverse(),
            }];
            ov371 = [{
                name: "Region",
                labels: ["Digitization", "Facility Diagnostics", "Sales Consultant", "Deal Diagnostics",
                    "Paperwork Diagnostics", "Delivery Process Diagnostics"
                ].reverse(),
                values: benchregionfactorPPT.reverse(),
            }];
            let ov471 = [{
                name: "Main Dealer",
                labels: ["Digitization", "Facility Diagnostics", "Sales Consultant", "Deal Diagnostics",
                    "Paperwork Diagnostics", "Delivery Process Diagnostics"
                ].reverse(),
                values: benchdealerfactorPPT.reverse(),
            }];

            let ov571 = [{
                name: "Dealer",
                labels: ["Digitization", "Facility Diagnostics", "Sales Consultant", "Deal Diagnostics",
                    "Paperwork Diagnostics", "Delivery Process Diagnostics"
                ].reverse(),
                values: benchsubdealerfactorPPT.reverse(),
            }];
            slide28 = pptx.addSlide();

            slide27.addImage({
                x: 0.2,
                y: 0.2,
                w: '20%',
                h: 0.2,
                path: "assets/images/Hyundai2.png"
            });
            slide27.addImage({
                x: 2.5,
                y: 0.2,
                w: '20%',
                h: 0.2,
                path: "assets/images/nlogo.png"
            });
            slide27.addText(`Active Tab:Benchmark`, {
                x: 0.5,
                y: 0.4,
                w: '100%',
                h: 0.5,
                color: "006690",
                fontSize: 12,
                bold: true
            });
            slide27.addText(`Applied Filter:${addText}`, {
                x: 0.5,
                y: 0.6,
                w: '100%',
                h: 0.5,
                color: "006690",
                fontSize: 12,
                bold: true
            });
            slide28.addText("All India", optb1a71);
            slide28.addChart(pptx.charts.BAR, ov171, barb1a71);
            slide28.addText("Zone", optb1b71);
            slide28.addChart(pptx.charts.BAR, ov271, barb1b71);
            slide28.addText("Region", optb1c71);
            slide28.addChart(pptx.charts.BAR, ov371, barb1c71);
            slide28.addText("Main Dealer", optb1d71);
            slide28.addChart(pptx.charts.BAR, ov471, barb1d71);
            slide28.addText("Dealer", optb1e71);
            slide28.addChart(pptx.charts.BAR, ov571, barb1e71);
        }
        if (stateLengthY != 0 && cityLengthY == 0) {
            let optb1a = {
                x: 0.0,
                y: 1.3,
                w: '25%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };
            let optb1b = {
                x: 2.0,
                y: 1.3,
                w: '25%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };
            let optb1c = {
                x: 4.3,
                y: 1.3,
                w: '25%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };
            let optb1d = {
                x: 6.3,
                y: 1.3,
                w: '25%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };

            let barb1a = {
                x: 0.2,
                y: 3.5,
                w: 2.5,
                h: 2,
                chartColors: ['b4c7e7'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                dataLabelFormatCode: "#.0",
                valAxisHidden: true,

                showPercent: false,
                showLegend: false,
                showTitle: false,

            };
            let barb1aa = {
                x: 0.2,
                y: 1.5,
                w: 2,
                h: 2,
                chartColors: ['b4c7e7'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,

                showPercent: false,
                showLegend: false,
                showTitle: false,

            };

            let barb1b = {
                x: 2.8,
                y: 3.5,
                w: 2.5,
                h: 2,
                chartColors: ['0000ff'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                dataLabelFormatCode: "#.0",
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };
            let barb1bb = {
                x: 2.8,
                y: 1.5,
                w: 2,
                h: 2,
                chartColors: ['0000ff'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };

            let barb1c = {
                x: 4.9,
                y: 3.5,
                w: 2.3,
                h: 2,
                chartColors: ['a5a5a5'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                dataLabelFormatCode: "#.0",
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };
            let barb1cc = {
                x: 4.9,
                y: 1.5,
                w: 2,
                h: 2,
                chartColors: ['a5a5a5'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };

            let barb1d = {
                x: 6.7,
                y: 3.5,
                w: 2.3,
                h: 2,
                chartColors: ['002a5c'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                dataLabelFormatCode: "#.0",
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };

            let barb1dd = {
                x: 6.7,
                y: 1.5,
                w: 2,
                h: 2,
                chartColors: ['002a5c'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };

            let ov1 = [{
                name: "All India",
                labels: ['Hyundai Nps', 'Dealer Nps'],
                values: [benchindianpsPPT[0], benchindianpsPPT[1]],
            }];
            let ov1a = [{
                name: "All India",
                labels: ['SSI Score'],
                values: [benchindianpsPPT[2]],
            }];

            graphbench2 = [{
                name: "Zone",
                labels: ["Hyundai NPS", "Dealer NPS"],
                values: [benchzonenpsPPT[0], benchzonenpsPPT[1]],
            }];
            let graphbench2a = [{
                name: "Zone",
                labels: ['SSI Score'],
                values: [benchzonenpsPPT[2]],
            }];
            let ov3 = [{
                name: "Region",
                labels: ['Hyundai Nps', 'Dealer Nps'],
                values: [benchregionnpsPPT[0], benchregionnpsPPT[1]],
            }];
            let ov3a = [{
                name: "Region",
                labels: ['SSI Score'],
                values: [benchregionnpsPPT[2]],
            }];
            let ov4 = [{
                name: "State",
                labels: ['Hyundai Nps', 'Dealer Nps'],
                values: [benchstatenpsPPT[0], benchstatenpsPPT[1]],
            }];
            let ov4a = [{
                name: "State",
                labels: ['SSI Performance Index'],
                values: [benchstatenpsPPT[2]],
            }];

            slide27 = pptx.addSlide();

            slide27.addImage({
                x: 0.2,
                y: 0.2,
                w: '20%',
                h: 0.2,
                path: "assets/images/Hyundai2.png"
            });
            slide27.addImage({
                x: 2.5,
                y: 0.2,
                w: '20%',
                h: 0.2,
                path: "assets/images/nlogo.png"
            });
            slide27.addText(`Active Tab:Benchmark`, {
                x: 0.5,
                y: 0.4,
                w: '100%',
                h: 0.5,
                color: "006690",
                fontSize: 12,
                bold: true
            });
            slide27.addText(`Applied Filter:${addText}`, {
                x: 0.5,
                y: 0.6,
                w: '100%',
                h: 0.5,
                color: "006690",
                fontSize: 12,
                bold: true
            });
            slide27.addText("All India", optb1a);
            slide27.addChart(pptx.charts.BAR, ov1, barb1a);
            slide27.addChart(pptx.charts.BAR, ov1a, barb1aa);
            slide27.addText("Zone", optb1b);
            slide27.addChart(pptx.charts.BAR, graphbench2, barb1b);
            slide27.addChart(pptx.charts.BAR, graphbench2a, barb1bb);
            slide27.addText("Region", optb1c);
            slide27.addChart(pptx.charts.BAR, ov3, barb1c);
            slide27.addChart(pptx.charts.BAR, ov3a, barb1cc);
            slide27.addText("State", optb1d);
            slide27.addChart(pptx.charts.BAR, ov4, barb1d);
            slide27.addChart(pptx.charts.BAR, ov4a, barb1dd);

            let slide28;
            let optb1a71 = {
                x: 0.0,
                y: 1.3,
                w: '25%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };
            let optb1b71 = {
                x: 2.3,
                y: 1.3,
                w: '25%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };
            let optb1c71 = {
                x: 4.3,
                y: 1.3,
                w: '25%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };
            let optb1d71 = {
                x: 6.0,
                y: 1.3,
                w: '25%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };

            let barb1a71 = {
                x: 0.2,
                y: 1.5,
                w: 2.5,
                h: 2,
                chartColors: ['b4c7e7'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,

                showPercent: false,
                showLegend: false,
                showTitle: false,

            };


            let barb1b71 = {
                x: 2.8,
                y: 1.5,
                w: 2.5,
                h: 2,
                chartColors: ['0000ff'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };


            let barb1c71 = {
                x: 4.9,
                y: 1.5,
                w: 2.5,
                h: 2,
                chartColors: ['a5a5a5'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };


            let barb1d71 = {
                x: 6.7,
                y: 1.5,
                w: 2.5,
                h: 2,
                chartColors: ['002a5c'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };



            ov171 = [{
                name: "All India",
                labels: ["Digitization", "Facility Diagnostics", "Sales Consultant", "Deal Diagnostics",
                    "Paperwork Diagnostics", "Delivery Process Diagnostics"
                ].reverse(),
                values: benchindiafactorPPT.reverse(),
            }];


            ov271 = [{
                name: "Zone",
                labels: ["Digitization", "Facility Diagnostics", "Sales Consultant", "Deal Diagnostics",
                    "Paperwork Diagnostics", "Delivery Process Diagnostics"
                ].reverse(),
                values: benchzonefactorPPT.reverse(),
            }];
            ov371 = [{
                name: "Region",
                labels: ["Digitization", "Facility Diagnostics", "Sales Consultant", "Deal Diagnostics",
                    "Paperwork Diagnostics", "Delivery Process Diagnostics"
                ].reverse(),
                values: benchregionfactorPPT.reverse(),
            }];
            let ov471 = [{
                name: "State",
                labels: ["Digitization", "Facility Diagnostics", "Sales Consultant", "Deal Diagnostics",
                    "Paperwork Diagnostics", "Delivery Process Diagnostics"
                ].reverse(),
                values: benchstatefactorPPT.reverse(),
            }];

            slide28 = pptx.addSlide();

            slide28.addImage({
                x: 0.2,
                y: 0.2,
                w: '20%',
                h: 0.2,
                path: "assets/images/Hyundai2.png"
            });
            slide28.addImage({
                x: 2.5,
                y: 0.2,
                w: '20%',
                h: 0.2,
                path: "assets/images/nlogo.png"
            });
            slide28.addText(`Active Tab:Benchmark`, {
                x: 0.5,
                y: 0.4,
                w: '100%',
                h: 0.5,
                color: "006690",
                fontSize: 12,
                bold: true
            });
            slide28.addText(`Applied Filter:${addText}`, {
                x: 0.5,
                y: 0.6,
                w: '100%',
                h: 0.5,
                color: "006690",
                fontSize: 12,
                bold: true
            });
            slide28.addText("All India", optb1a71);
            slide28.addChart(pptx.charts.BAR, ov171, barb1a71);
            slide28.addText("Zone", optb1b71);
            slide28.addChart(pptx.charts.BAR, ov271, barb1b71);
            slide28.addText("Region", optb1c71);
            slide28.addChart(pptx.charts.BAR, ov371, barb1c71);
            slide28.addText("State", optb1d71);
            slide28.addChart(pptx.charts.BAR, ov471, barb1d71);
        }
        if (cityLengthY != 0) {
            let slide27;
            let optb1a = {
                x: 0.3,
                y: 1.3,
                w: '25%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };
            let optb1b = {
                x: 2.5,
                y: 1.3,
                w: '15%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };
            let optb1c = {
                x: 4.2,
                y: 1.3,
                w: '15%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };
            let optb1d = {
                x: 5.8,
                y: 1.3,
                w: '15%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };
            let optb1e = {
                x: 7.6,
                y: 1.3,
                w: '15%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };

            let barb1a = {
                x: 0.3,
                y: 3.5,
                w: 2,
                h: 2,
                chartColors: ['b4c7e7'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                dataLabelFormatCode: "#.0",
                valAxisHidden: true,

                showPercent: false,
                showLegend: false,
                showTitle: false,

            };
            let barb1aa = {
                x: 0.2,
                y: 1.5,
                w: 2,
                h: 2,
                chartColors: ['b4c7e7'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,

                showPercent: false,
                showLegend: false,
                showTitle: false,

            };

            let barb1b = {
                x: 2.8,
                y: 3.5,
                w: 1.5,
                h: 2,
                chartColors: ['0000ff'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                dataLabelFormatCode: "#.0",
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };
            let barb1bb = {
                x: 2.8,
                y: 1.5,
                w: 1.5,
                h: 2,
                chartColors: ['0000ff'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };

            let barb1c = {
                x: 4.7,
                y: 3.5,
                w: 1.5,
                h: 2,
                chartColors: ['a5a5a5'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                dataLabelFormatCode: "#.0",
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };
            let barb1cc = {
                x: 4.7,
                y: 1.5,
                w: 1.5,
                h: 2,
                chartColors: ['a5a5a5'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };

            let barb1d = {
                x: 6.5,
                y: 3.5,
                w: 1.5,
                h: 2,
                chartColors: ['002a5c'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                dataLabelFormatCode: "#.0",
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };

            let barb1dd = {
                x: 6.5,
                y: 1.5,
                w: 1.5,
                h: 2,
                chartColors: ['002a5c'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };
            let barb1e = {
                x: 8.0,
                y: 3.5,
                w: 1.5,
                h: 2,
                chartColors: ['002a5c'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                dataLabelFormatCode: "#.0",
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };
            let barb1ee = {
                x: 8.0,
                y: 1.5,
                w: 1.5,
                h: 2,
                chartColors: ['002a5c'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };

            let ov1 = [{
                name: "All India",
                labels: ['Hyundai Nps', 'Dealer Nps'],
                values: [benchindianpsPPT[0], benchindianpsPPT[1]],
            }];
            let ov1a = [{
                name: "All India",
                labels: ['SSI Score'],
                values: [benchindianpsPPT[2]],
            }];

            graphbench2 = [{
                name: "Zone",
                labels: ["Hyundai NPS", "Dealer NPS"],
                values: [benchzonenpsPPT[0], benchzonenpsPPT[1]],
            }];
            let graphbench2a = [{
                name: "Zone",
                labels: ['SSI Score'],
                values: [benchzonenpsPPT[2]],
            }];
            let ov3 = [{
                name: "Region",
                labels: ['Hyundai Nps', 'Dealer Nps'],
                values: [benchregionnpsPPT[0], benchregionnpsPPT[1]],
            }];
            let ov3a = [{
                name: "Region",
                labels: ['SSI Score'],
                values: [benchregionnpsPPT[2]],
            }];
            let ov4 = [{
                name: "State",
                labels: ['Hyundai Nps', 'Dealer Nps'],
                values: [benchstatenpsPPT[0], benchstatenpsPPT[1]],
            }];
            let ov4a = [{
                name: "State",
                labels: ['SSI Performance Index'],
                values: [benchstatenpsPPT[2]],
            }];
            let ov5 = [{
                name: "City",
                labels: ['Hyundai Nps', 'Dealer Nps'],
                values: [benchcitynpsPPT[0], benchcitynpsPPT[1]],
            }];
            let ov5a = [{
                name: "City",
                labels: ['SSI Performance Index'],
                values: [benchcitynpsPPT[2]],
            }];

            slide27 = pptx.addSlide();

            slide27.addImage({
                x: 0.2,
                y: 0.2,
                w: '20%',
                h: 0.2,
                path: "assets/images/Hyundai2.png"
            });
            slide27.addImage({
                x: 2.5,
                y: 0.2,
                w: '20%',
                h: 0.2,
                path: "assets/images/nlogo.png"
            });
            slide27.addText(`Active Tab:Benchmark`, {
                x: 0.5,
                y: 0.4,
                w: '100%',
                h: 0.5,
                color: "006690",
                fontSize: 12,
                bold: true
            });
            slide27.addText(`Applied Filter:${addText}`, {
                x: 0.5,
                y: 0.6,
                w: '100%',
                h: 0.5,
                color: "006690",
                fontSize: 12,
                bold: true
            });
            slide27.addText("All India", optb1a);
            slide27.addChart(pptx.charts.BAR, ov1, barb1a);
            slide27.addChart(pptx.charts.BAR, ov1a, barb1aa);
            slide27.addText("Zone", optb1b);
            slide27.addChart(pptx.charts.BAR, graphbench2, barb1b);
            slide27.addChart(pptx.charts.BAR, graphbench2a, barb1bb);
            slide27.addText("Region", optb1c);
            slide27.addChart(pptx.charts.BAR, ov3, barb1c);
            slide27.addChart(pptx.charts.BAR, ov3a, barb1cc);
            slide27.addText("State", optb1d);
            slide27.addChart(pptx.charts.BAR, ov4, barb1d);
            slide27.addChart(pptx.charts.BAR, ov4a, barb1dd);
            slide27.addText("City", optb1e);
            slide27.addChart(pptx.charts.BAR, ov5, barb1e);
            slide27.addChart(pptx.charts.BAR, ov5a, barb1ee);


            let slide28;
            let optb1a71 = {
                x: 0.0,
                y: 1.3,
                w: '40%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };
            let optb1b71 = {
                x: 3.0,
                y: 1.3,
                w: '15%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };
            let optb1c71 = {
                x: 4.4,
                y: 1.3,
                w: '15%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };
            let optb1d71 = {
                x: 5.6,
                y: 1.3,
                w: '15%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };
            let optb1e71 = {
                x: 7.4,
                y: 1.3,
                w: '15%',
                h: 0.5,
                fontSize: 14,
                color: '000000',
                align: 'center',
            };

            let barb1a71 = {
                x: 0.2,
                y: 1.5,
                w: 3,
                h: 2,
                chartColors: ['b4c7e7'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,

                showPercent: false,
                showLegend: false,
                showTitle: false,

            };


            let barb1b71 = {
                x: 3.1,
                y: 1.5,
                w: 1.5,
                h: 2,
                chartColors: ['0000ff'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };


            let barb1c71 = {
                x: 4.7,
                y: 1.5,
                w: 1.5,
                h: 2,
                chartColors: ['a5a5a5'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };


            let barb1d71 = {
                x: 6.3,
                y: 1.5,
                w: 1.5,
                h: 2,
                chartColors: ['002a5c'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };


            let barb1e71 = {
                x: 8.0,
                y: 1.5,
                w: 1.5,
                h: 2,
                chartColors: ['002a5c'],
                align: 'center',
                barDir: "bar",
                dataLabelColor: "000000",
                dataLabelFontFace: "Arial",
                dataLabelFontSize: 9,
                dataLabelFontBold: true,
                showValue: true,

                catAxisLabelColor: "000000",
                catAxisLabelFontFace: "Courier",
                catAxisLabelFontSize: 9,
                catAxisOrientation: "minMax",
                valAxisMajorTickMark: "none",
                valAxisMinorTickMark: "none",
                valGridLine: {
                    style: 'none'
                },
                valAxisHidden: true,
                catAxisHidden: true,
                showPercent: false,
                showLegend: false,
                showTitle: false,

            };


            ov171 = [{
                name: "All India",
                labels: ["Digitization", "Facility Diagnostics", "Sales Consultant", "Deal Diagnostics",
                    "Paperwork Diagnostics", "Delivery Process Diagnostics"
                ].reverse(),
                values: benchindiafactorPPT.reverse(),
            }];


            ov271 = [{
                name: "Zone",
                labels: ["Digitization", "Facility Diagnostics", "Sales Consultant", "Deal Diagnostics",
                    "Paperwork Diagnostics", "Delivery Process Diagnostics"
                ].reverse(),
                values: benchzonefactorPPT.reverse(),
            }];
            ov371 = [{
                name: "Region",
                labels: ["Digitization", "Facility Diagnostics", "Sales Consultant", "Deal Diagnostics",
                    "Paperwork Diagnostics", "Delivery Process Diagnostics"
                ].reverse(),
                values: benchregionfactorPPT.reverse(),
            }];
            let ov471 = [{
                name: "State",
                labels: ["Digitization", "Facility Diagnostics", "Sales Consultant", "Deal Diagnostics",
                    "Paperwork Diagnostics", "Delivery Process Diagnostics"
                ].reverse(),
                values: benchstatefactorPPT.reverse(),
            }];

            let ov571 = [{
                name: "City",
                labels: ["Digitization", "Facility Diagnostics", "Sales Consultant", "Deal Diagnostics",
                    "Paperwork Diagnostics", "Delivery Process Diagnostics"
                ].reverse(),
                values: benchcityfactorPPT.reverse(),
            }];
            slide28 = pptx.addSlide();
            console.log(ov571);
            slide28.addImage({
                x: 0.2,
                y: 0.2,
                w: '20%',
                h: 0.2,
                path: "assets/images/Hyundai2.png"
            });
            slide28.addImage({
                x: 2.5,
                y: 0.2,
                w: '20%',
                h: 0.2,
                path: "assets/images/nlogo.png"
            });
            slide28.addText(`Active Tab:Benchmark`, {
                x: 0.5,
                y: 0.4,
                w: '100%',
                h: 0.5,
                color: "006690",
                fontSize: 12,
                bold: true
            });
            slide28.addText(`Applied Filter:${addText}`, {
                x: 0.5,
                y: 0.6,
                w: '100%',
                h: 0.5,
                color: "006690",
                fontSize: 12,
                bold: true
            });
            slide28.addText("All India", optb1a71);
            slide28.addChart(pptx.charts.BAR, ov171, barb1a71);
            slide28.addText("Zone", optb1b71);
            slide28.addChart(ppzontx.charts.BAR, ov271, barb1b71);
            slide28.addText("Region", optb1c71);
            slide28.addChart(pptx.charts.BAR, ov371, barb1c71);
            slide28.addText("State", optb1d71);
            slide28.addChart(pptx.charts.BAR, ov471, barb1d71);
            slide28.addText("City", optb1e71);
            slide28.addChart(pptx.charts.BAR, ov571, barb1e71);
        }
        pptx.writeFile();


    }
    //=================================Export============================================
    </script>
</body>

</html>