! function (s) {

    "use strict";

    var r = function () {};

    r.prototype.respChart = function (r, a, e, o) {

        Chart.defaults.global.defaultFontColor = "#6c7897", Chart.defaults.scale.gridLines.color = "rgba(108, 120, 151, 0.1)";

        var t = r.get(0).getContext("2d"),

            n = s(r).parent();



        function i() {

            r.attr("width", s(n).width());

            switch (a) {

                case "Line":

                    new Chart(t, {

                        type: "line",

                        data: e,

                        options: o

                    });

                    break;

                case "Doughnut":

                    new Chart(t, {

                        type: "doughnut",

                        data: e,

                        options: o

                    });

                    break;

                case "Pie":

                    new Chart(t, {

                        type: "pie",

                        data: e,

                        options: o

                    });

                    break;

                case "Bar":

                    new Chart(t, {

                        type: "bar",

                        data: e,

                        options: o

                    });

                    break;

                case "Radar":

                    new Chart(t, {

                        type: "radar",

                        data: e,

                        options: o

                    });

                    break;

                case "PolarArea":

                    new Chart(t, {

                        type: "polarArea",

                        data: e,

                        options: o

                    })

            }

        }

        s(window).resize(i), i()

    }, r.prototype.init = function () {

        var r = {

            legend: {

                display: !1

            }

        };

        this.respChart(s("#lineChart"), "Line", {

            labels: ["January", "February", "March", "April", "May", "June", "July"],

            datasets: [{

                backgroundColor: "rgba(234, 105, 103, 0.75)",

                borderColor: "rgba(234, 105, 103, 0.75)",

                pointColor: "#fff",

                pointStrokeColor: "rgba(234, 105, 103, 0.75)",

                data: [33, 52, 63, 92, 50, 53, 46]

            }, {

                backgroundColor: "#ececec",

                borderColor: "#ececec",

                pointColor: "#fff",

                pointStrokeColor: "#ececec",

                data: [15, 25, 40, 35, 32, 9, 33]

            }]

        }, r);

        this.respChart(s("#doughnut"), "Doughnut", {

            labels: ["Jan", "Feb", "Mar", "Apr"],

            datasets: [{

                data: [80, 50, 80, 50],

                backgroundColor: ["#4998fa", "#ececec", "#ea6967", "#fab249"]

            }]

        });

        this.respChart(s("#pie"), "Pie", {

            labels: ["Series A", "Series B", "Series C"],

            datasets: [{

                data: [40, 80, 70],

                backgroundColor: ["#ececec", "#ea6967", "#fab249"]

            }]

        });

        r = {

            legend: {

                display: !1

            }

        };

        this.respChart(s("#bar"), "Bar", {

            labels: ["January", "February", "March", "April", "May", "June", "July"],

            datasets: [{

                backgroundColor: "#ef5350",

                borderColor: "#ef5350",

                data: [65, 59, 90, 81, 56, 55, 40]

            }, {

                backgroundColor: "#ececec",

                borderColor: "#ececec",

                data: [28, 48, 40, 19, 96, 27, 100]

            }]

        }, r);

        this.respChart(s("#radar"), "Radar", {

            labels: ["Eating", "Drinking", "Sleeping", "Designing", "Coding", "Partying", "Running"],

            datasets: [{

                label: "Desktops",

                backgroundColor: "rgba(234, 105, 103, 0.5)",

                borderColor: "rgba(234, 105, 103, 0.75)",

                pointBackgroundColor: "rgba(234, 105, 103, 1)",

                pointBorderColor: "#fff",

                pointHoverBackgroundColor: "#fff",

                data: [65, 59, 90, 81, 56, 55, 40]

            }, {

                label: "Tablets",

                backgroundColor: "rgba(236, 236, 236, 0.5)",

                borderColor: "rgba(220, 220, 220, 0.75)",

                pointBackgroundColor: "rgba(236, 236, 236,1)",

                pointBorderColor: "#fff",

                pointHoverBackgroundColor: "#fff",

                pointHoverBorderColor: "rgba(255,99,132,1)",

                data: [28, 48, 40, 19, 96, 27, 100]

            }]

        });

        this.respChart(s("#polarArea"), "PolarArea", {

            datasets: [{

                data: [30, 90, 24, 58, 82, 8],

                backgroundColor: ["#60b1cc", "#fab249", "#4697ce", "#4998fa", "#ea6967", "#1ca8dd"]

            }],

            labels: ["Series 1", "Series 2", "Series 3", "Series 4", "Series 5", "Series 6"]

        })

    }, s.ChartJs = new r, s.ChartJs.Constructor = r

}(window.jQuery),

function (r) {

    "use strict";

    window.jQuery.ChartJs.init()

}();