/* Template Name: Admin Pro Admin Author: Wrappixel Email: niravjoshi87@gmail.com File: js */ $(function () { "use strict"; // ============================================================== // Overview // ============================================================== var chart = c3.generate({ bindto: '.overview1' , data: { columns: [ ['Site A', 5, 6, 3, 7, 9, 10, 14, 12, 11, 9, 8, 7, 10, 6, 12, 10, 8] , ['Site B', 1, 2, 8, 3, 4, 5, 7, 6, 5, 6, 4, 3, 3, 12, 5, 6, 3] ] , type: 'line' } , axis: { y: { show: true , tick: { count: 0 , outer: false } } , x: { show: true , } } , padding: { top: 40 , right: 10 , bottom: 40 , left: 20 , } , point: { r: 4 , } , legend: { hide: true //or hide: 'data1' //or hide: ['data1', 'data2'] } , color: { pattern: ['#2961ff', '#dadada', '#ff821c', '#7e74fb'] } }); // ============================================================== // Revenue // ============================================================== var chart = c3.generate({ bindto: '.revenue', data: { columns: [ ['Email', 45], ['Website', 15], ['Mobile', 27], ['Other', 18], ], type : 'donut', onclick: function (d, i) { console.log("onclick", d, i); }, onmouseover: function (d, i) { console.log("onmouseover", d, i); }, onmouseout: function (d, i) { console.log("onmouseout", d, i); } }, donut: { label: { show: false }, title:"Revenue", width:35, }, legend: { hide: false //or hide: 'data1' //or hide: ['data1', 'data2'] }, color: { pattern: ['#40c4ff', '#2961ff', '#ff821c', '#7e74fb'] } }); // ============================================================== // Conversation // ============================================================== var chart = c3.generate({ bindto: '.conversation' , data: { columns: [ ['Site A', 5, 6, 3, 7, 9, 10, 14, 12, 11, 9, 8, 7, 10, 6, 12, 10, 8] , ['Site B', 1, 2, 8, 3, 4, 5, 7, 6, 5, 6, 4, 3, 3, 12, 5, 6, 3] ] , type: 'spline' } , axis: { y: { show: true , tick: { count: 0 , outer: false } } , x: { show: true , } } , padding: { top: 40 , right: 10 , bottom: 40 , left: 20 , } , point: { r: 0 , } , legend: { hide: false //or hide: 'data1' //or hide: ['data1', 'data2'] } , color: { pattern: ['#2961ff', '#ff821c', '#ff821c', '#7e74fb'] } }); // ============================================================== // Conversation Rate // ============================================================== var chart = c3.generate({ bindto: '.rate', data: { columns: [ ['Conversation', 85], ['other', 15], ], type : 'donut', onclick: function (d, i) { console.log("onclick", d, i); }, onmouseover: function (d, i) { console.log("onmouseover", d, i); }, onmouseout: function (d, i) { console.log("onmouseout", d, i); } }, donut: { label: { show: false }, title:"Coversation", width:10, } , padding: { top:10, bottom:-20 , }, legend: { hide: true //or hide: 'data1' //or hide: ['data1', 'data2'] }, color: { pattern: ['#2961ff', '#dadada', '#ff821c', '#7e74fb'] } }); // ============================================================== // Our Visitor // ============================================================== var sparklineLogin = function () { $('#activeu').sparkline([6, 10, 9, 11, 9, 10, 12, 11, 10, 9, 11, 9, 10], { type: 'bar' , height: '122' , barWidth: '4' , width: '100%' , resize: true , barSpacing: '11' , barColor: '#fff' }); }; var sparkResize; $(window).resize(function (e) { clearTimeout(sparkResize); sparkResize = setTimeout(sparklineLogin, 500); }); sparklineLogin(); // ============================================================== // EArnings // ============================================================== var chart = c3.generate({ bindto: '.earnings' , data: { columns: [ ['Site A', 0, 6, 3, 7, 9, 10, 14, 12, 11, 9, 8, 7, 10, 6, 12, 10, 8] ] , type: 'spline' } , axis: { y: { show: false , tick: { count: 0 , outer: false } } , x: { show: false , } } , padding: { top: 0 , right: 10 , bottom: 0 , left: 20 , } , point: { r: 0 , } , legend: { hide: true //or hide: 'data1' //or hide: ['data1', 'data2'] } , color: { pattern: ['#fff', '#ff821c', '#ff821c', '#7e74fb'] } }); });