

$(function() {
    "use strict";

    $.ajax({
    url: './ajax/dashboard/account_receivable/load_chartis_account_area_ajax.php',
    type: "POST",
    dataType: "json",
    success: function (data) {

      console.log(data);

    // -----------------------------------------------------------------------
    // sales ratio
    // -----------------------------------------------------------------------
    var options_sales_ratio = { 
        series: [{
            
            name: "Accounts Receivable: $",

            data: data
        }],
        chart: {
            height: 80,
            type: 'area',
            fontFamily: '"Nunito Sans",sans-serif',
            zoom: {
                enabled: false
            },
            toolbar: {
                show: false
            },
            sparkline: {
                enabled: true
            }
        },
        dataLabels: {

            enabled: false
        },
        colors: ['#2962ff'],
        stroke: {
            curve: 'smooth',
            width: 2,
        },
        fill: {
            type: 'solid',
            opacity: 0.2
        },
        grid: {
            show: false
        },
        xaxis: {
            show: true
        },
        yaxis: {
            show: false
        },
        tooltip: {
            theme: "dark",
        },
    };

    var chart_line_basic = new ApexCharts(document.querySelector(".sales-ratio"), options_sales_ratio);
    chart_line_basic.render();

     },


    error: function (data) {

    },
  });

   cdp_load(1); 
});




