function generateChart() {
                    // make chart width fit with its container
                    var ww = selector.attr('width', $(container).width());
                    var chart;
                    switch (type) {
                        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
this function produce the responsive Chart JS
function generateChart() {
                    var ww = selector.attr('width', $(container).width());
                    var chart;
                    switch (type) {
                        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 '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