/**  DMARC home **/
var oilCanvas = document.getElementById("DmarcHOMEChart");
Chart.defaults.global.defaultFontFamily = "Lato";
Chart.defaults.global.defaultFontSize = 11;
var oilData = {
    labels: [
        "Pass",
        "Fail"
        
        
    ],
    datasets: [
        {
            data: [33, 56],
            backgroundColor: [
                "#4F935C",
                "#DC3912"
             
            ]
        }]
};

var pieChart = new Chart(oilCanvas, {
  type: 'pie',
  data: oilData
});



var ctx = document.getElementById("DMARC-HOME-BAR").getContext('2d');
var myChart = new Chart(ctx, {
	type: 'bar',
	data: {
		labels: ["02/11","02/15","02/15","02/15","02/15","02/15","02/15","02/15","02/15"],
		datasets: [{
			label: 'Pass',
			backgroundColor: "#4F935C",
			data: [0, 10, 5, 26, 100, 12, 59, 100, 23],
		}, {
			label: 'Fail',
			backgroundColor: "#DC3912",
			data: [100, 6, 25, 6, 0, 12, 59, 0, 74],
		}],
	},
options: {
    tooltips: {
      displayColors: true,
      callbacks:{
        mode: 'y',
      },
    },
    scales: {
      xAxes: [{
        stacked: true,
        gridLines: {
          display: true,
        }
      }],
      yAxes: [{
        stacked: true,
        ticks: {
            min: 0,
            max: 100,
            callback: function(value){return value+ "%"}
        },
        type: 'linear',
      }]
    },
		responsive: true,
		maintainAspectRatio: true,
		legend: { position: 'bottom' },
	}
});
