$(document).ready(function() {
                    
    //Flot Pie Chart
    $(function() {

        Morris.Bar({
            element: 'morris-bar-chart',
            data: <?php echo $locationResult;?>,
            xkey: 'y',
            ykeys: ['a'],
            hideHover: 'auto',
            resize: true
        });

        Morris.Donut({
            element: 'morris-donut-chart',
            data: [{
                label: "Download Sales",
                value: 12
            }, {
                label: "In-Store Sales",
                value: 30
            }, {
                label: "Mail-Order Sales",
                value: 20
            }],
            resize: true
        });

    });  
});