public/assets/js/pages/dashboard-3.init.js
// this function produce the responsive Chart JS
this function produce the responsive Chart JS
this function produce the responsive Chart JS
function generateChart() {
      var ww = selector.attr('width', $(container).width());
      var chart;
      switch (type) {
        case 'Line':
          chart = new Chart(ctx, {
            type: 'line',
            data: data,
            options: options
          });
          break;
        case 'Doughnut':
          chart = new Chart(ctx, {
            type: 'doughnut',
            data: data,
            options: options
          });
          break;
        case 'Pie':
          chart = new Chart(ctx, {
            type: 'pie',
            data: data,
            options: options
          });
          break;
        case 'Bar':
          chart = new Chart(ctx, {
            type: 'bar',
            data: data,
            options: options
          });
          break;
        case 'Radar':
          chart = new Chart(ctx, {
            type: 'radar',
            data: data,
            options: options
          });
          break;
        case 'PolarArea':
          chart = new Chart(ctx, {
            data: data,
            type: 'polarArea',
            options: options
          });
          break;
      }
      return chart;
    }
function generateChart ( ) { var ww = selector . attr ( 'width' , $ ( container ) . width ( ) ) ; var chart ; switch ( type ) { case 'Line' : chart = new Chart ( ctx , { type : 'line' , data : data , options : options } ) ; break ; case 'Doughnut' : chart = new Chart ( ctx , { type : 'doughnut' , data : data , options : options } ) ; break ; case 'Pie' : chart = new Chart ( ctx , { type : 'pie' , data : data , options : options } ) ; break ; case 'Bar' : chart = new Chart ( ctx , { type : 'bar' , data : data , options : options } ) ; break ; case 'Radar' : chart = new Chart ( ctx , { type : 'radar' , data : data , options : options } ) ; break ; case 'PolarArea' : chart = new Chart ( ctx , { data : data , type : 'polarArea' , options : options } ) ; break ; } return chart ; }
this function produce the responsive Chart JS
this function produce the responsive Chart JS
// make chart width fit with its container