Sha256: 9fdc40732b66aa3776dd21b687f81474a6a71ff1d83d457778f96cbaa889587b

Contents?: true

Size: 1.36 KB

Versions: 39

Compression:

Stored size: 1.36 KB

Contents

/**
* Theme: Ubold Admin Template
* Author: Coderthemes
* Leads
*/

!function($) {
    "use strict";

    var LeadsCharts = function() {};

    //creates Stacked chart
    LeadsCharts.prototype.createStackedChart  = function(element, data, xkey, ykeys, labels, lineColors) {
        Morris.Bar({
            element: element,
            data: data,
            xkey: xkey,
            ykeys: ykeys,
            stacked: true,
            labels: labels,
            hideHover: 'auto',
            resize: true, //defaulted to true
            gridLineColor: '#eeeeee',
            barColors: lineColors
        });
    },
    
    LeadsCharts.prototype.init = function() {

        
        //creating Stacked chart
        var $stckedData  = [
            { y: 'Mon', a: 45, b: 180 },
            { y: 'Tue', a: 75,  b: 65 },
            { y: 'Wed', a: 100, b: 90 },
            { y: 'Thur', a: 75,  b: 65 },
            { y: 'Fri', a: 100, b: 90 },
            { y: 'Sat', a: 75,  b: 65 },
            { y: 'Sun', a: 50,  b: 40 }
        ];
        this.createStackedChart('morris-bar-stacked', $stckedData, 'y', ['a', 'b'], ['Series A', 'Series B'], ['$brand-primary', '#ebeff2']);

    },
    //init
    $.LeadsCharts = new LeadsCharts, $.LeadsCharts.Constructor = LeadsCharts
}(window.jQuery),

//initializing 
function($) {
    "use strict";
    $.LeadsCharts.init();
}(window.jQuery);

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
wbase-0.3.20 lib/vendor/admin/jquery.leads.init.js
wbase-0.3.19 lib/vendor/admin/jquery.leads.init.js
wbase-0.3.18 lib/vendor/admin/jquery.leads.init.js
wbase-0.3.17 lib/vendor/admin/jquery.leads.init.js
wbase-0.3.16 lib/vendor/admin/jquery.leads.init.js
wbase-0.3.15 lib/vendor/admin/jquery.leads.init.js
wbase-0.3.14 lib/vendor/admin/jquery.leads.init.js
wbase-0.3.13 lib/vendor/admin/jquery.leads.init.js
wbase-0.3.12 lib/vendor/admin/jquery.leads.init.js
wbase-0.3.11 lib/vendor/admin/jquery.leads.init.js
wbase-0.3.10 lib/vendor/admin/jquery.leads.init.js
wbase-0.3.9 lib/vendor/admin/jquery.leads.init.js
wbase-0.3.8 lib/vendor/admin/jquery.leads.init.js
wbase-0.3.7 lib/vendor/admin/jquery.leads.init.js
wbase-0.3.6 lib/vendor/admin/jquery.leads.init.js
wbase-0.3.5 lib/vendor/admin/jquery.leads.init.js
wbase-0.3.4 lib/vendor/admin/jquery.leads.init.js
wbase-0.3.3 lib/vendor/admin/jquery.leads.init.js
wbase-0.3.2 lib/vendor/admin/jquery.leads.init.js
wbase-0.3.1 lib/vendor/admin/jquery.leads.init.js