
import { colors } from '../main';

export function C4_stacked(title){

    var chart = {
      chart: {
          type: 'column',
          height: 300
      },
      colors: ['#00758d','#00C1E5', '#3E5987', '#8DA5D8', '#004E5D', '#AEE3ED'],
      title: {
          text: title
      },
      credits: false,
      xAxis: {
        categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec','Acumulado']
      },
      yAxis: {
          min: 0,
          title: {
              text: '%'
          }
      },
      tooltip: {
          pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.y} horas</b> ({point.percentage:.0f}%)<br/>',
          shared: true
      },
      plotOptions: {
          column: {
              stacking: 'percent'
          }
      },
      series: [{
       
          name: 'Mant. Preventivo',
          data: [5, 3, 4, 7, 2, 3, 4 , 7, 3, 5, 6, 2, 9]
      }, {
       
          name: 'Mant. Correctivo',
          data: [2, 2, 3, 2, 1,0, 3 , 8, 4, 5, 3, 1, 3]
      }, {
        
          name: 'Det. causas Exógenas',
          data: [3, 4, 4, 2, 5,6, 4 , 6, 3, 2, 5, 4, 6]
      },
      {
        
          name: 'Det. de Línea',
          data: [8, 7, 5, 3, 2,3, 4 , 1, 5, 7, 3, 2, 11]
      }]
  
    }
    return chart;
  
  }