$ (function () {

'use strict';
document.getElementById('legenda-disponivel-qtd-vencido').innerHTML = "0";
document.getElementById('legenda-disponivel-qtd-aberto').innerHTML = "5";
document.getElementById('legenda-disponivel-valor').innerHTML = "0,00";
var donutTotal, donutAtraso, barVlr, barQtd, bar, donut;barQtd = new Morris.Bar({ 
    element: 'bar-chart-qtd', 
    resize: true, 
    hideHover: 'auto', 
    data: [{ 
        y: "Aberto", 
        a: 4, 
        b: 5 
    }, { 
        y: "Vencido", 
        a: 0, 
        b: 0 
    }], 
    xkey: 'y', 
    ykeys: ['a', 'b'], 
    labels: ['Utilizado', 'Disponível'], 
    barColors: ['#D32F2F', '#FF9800'], 
    grid: true, 
    gridLineColor: ['#727272'], 
    stacked: true, 
    barSizeRatio: 0.55, 
    xLabelMargin: 10, 
    gridTextSize: 10  
}); 

barVlr = new Morris.Bar({ 
    element: 'bar-chart-vlr', 
    resize: true, 
    hideHover: 'auto', 
    data: [{ 
        y: "Valor Limite", 
        a: 8503.91, 
        b: 0 
    }], 
    xkey: 'y', 
    ykeys: ['a', 'b'], 
    labels: ['Utilizado', 'Disponível'], 
    barColors: ['#D32F2F', '#FF9800'], 
    grid: true, 
    gridLineColor: ['#727272'], 
    stacked: true, 
    barSizeRatio: 0.55, 
    xLabelMargin: 10, 
    gridTextSize: 10  
}); 

 var donut = new Morris.Donut({ 
    element: 'donut-total-financeiro', 
    resize: true, 
    colors: ["#1B9AAA", "#9E9E9E", "#BD445F", "#607D8B", "#F2A594","#D9D9D9",
             "#154E71","#CFCF53", "#FF5850", "#B6B6B6", "#0A9600", "#E6E4E5", "#66CCFF",
             "#969696", "#DA5711", "#A3C2C2", "#E62E00", "#CC6699", "#00B386", "#B3B3CC", "#FF6600"],
    data: [{ 
        label: "Vencido", 
        value: 0 
    }, { 
        label: "Não Vencido", 
        value: 8503.91 
    }], 
    hideHover: 'auto' 
 }); 

 var donut = new Morris.Donut({ 
    element: 'dias-em-atraso', 
    resize: true, 
    colors: ["#1B9AAA", "#9E9E9E", "#BD445F", "#607D8B", "#F2A594","#D9D9D9",
             "#154E71","#CFCF53", "#FF5850", "#B6B6B6", "#0A9600", "#E6E4E5", "#66CCFF",
             "#969696", "#DA5711", "#A3C2C2", "#E62E00", "#CC6699", "#00B386", "#B3B3CC", "#FF6600"],
    data: [{ 
        label: "Média", 
        value: 1 
    }], 
    hideHover: 'auto' 
 }); 

});
