6 lines
4.2 KiB
JavaScript
6 lines
4.2 KiB
JavaScript
/*!
|
|
* Codebase - v3.0.0
|
|
* @author pixelcave - https://pixelcave.com
|
|
* Copyright (c) 2018
|
|
*/
|
|
!function(t){var e={};function o(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=t,o.c=e,o.d=function(t,e,r){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)o.d(r,n,function(e){return t[e]}.bind(null,n));return r},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=22)}({22:function(t,e,o){t.exports=o(23)},23:function(t,e){function o(t,e){for(var o=0;o<e.length;o++){var r=e[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var r=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n;return e=t,n=[{key:"initChartsCrypto",value:function(){Chart.defaults.global.defaultFontColor="#555555",Chart.defaults.scale.gridLines.color="transparent",Chart.defaults.global.elements.point.radius=5,Chart.defaults.global.elements.point.hoverRadius=7,Chart.defaults.global.tooltips.cornerRadius=3,Chart.defaults.global.legend.labels.boxWidth=15,Chart.defaults.global.legend.display=!1;var t,e,o,r=jQuery(".js-chartjs-bitcoin"),n=jQuery(".js-chartjs-ethereum"),a=jQuery(".js-chartjs-litecoin"),l=[];for(i=0;i<30;i++)l[i]=29===i?"1 day ago":30-i+" days ago";var s=[10500,10400,9500,8268,10218,8250,8707,9284,9718,9950,9879,10147,10883,11071,11332,11584,11878,13540,16501,16007,15142,14869,16762,17276,16808,16678,16771,12900,13100,14e3],u=[500,525,584,485,470,320,380,580,620,785,795,801,799,750,900,920,930,1300,1250,1150,1365,1258,980,870,860,925,999,1050,1090,1100],c=[300,320,330,331,335,340,358,310,220,180,190,195,203,187,198,258,270,340,356,309,218,230,242,243,250,210,205,226,214,250];jQuery('a[href="#crypto-coins-btc"]',"ul#crypto-tabs").on("shown.bs.tab",function(e){t&&t.destroy(),t=new Chart(r,{type:"line",data:{labels:l,datasets:[{label:"Bitcoin Price",fill:!0,backgroundColor:"rgba(255,193,7,.25)",borderColor:"rgba(255,193,7,1)",pointBackgroundColor:"rgba(255,193,7,1)",pointBorderColor:"#fff",pointHoverBackgroundColor:"#fff",pointHoverBorderColor:"rgba(255,193,7,1)",data:s}]},options:{maintainAspectRatio:!1,scales:{yAxes:[{ticks:{suggestedMin:6e3,suggestedMax:2e4}}]},tooltips:{intersect:!1,callbacks:{label:function(t,e){return" $"+t.yLabel}}}}})}),jQuery('a[href="#crypto-coins-eth"]',"ul#crypto-tabs").on("shown.bs.tab",function(t){e&&e.destroy(),e=new Chart(n,{type:"line",data:{labels:l,datasets:[{label:"Ethereum Price",fill:!0,backgroundColor:"rgba(111,124,186, .25)",borderColor:"rgba(111,124,186, 1)",pointBackgroundColor:"rgba(111,124,186, 1)",pointBorderColor:"#fff",pointHoverBackgroundColor:"#fff",pointHoverBorderColor:"rgba(111,124,186, 1)",data:u}]},options:{maintainAspectRatio:!1,scales:{yAxes:[{ticks:{suggestedMin:0,suggestedMax:1500}}]},tooltips:{intersect:!1,callbacks:{label:function(t,e){return" $"+t.yLabel}}}}})}),jQuery('a[href="#crypto-coins-ltc"]',"ul#crypto-tabs").on("shown.bs.tab",function(t){o&&o.destroy(),o=new Chart(a,{type:"line",data:{labels:l,datasets:[{label:"Litecoin Price",fill:!0,backgroundColor:"rgba(181,181,181,.25)",borderColor:"rgba(181,181,181,1)",pointBackgroundColor:"rgba(181,181,181,1)",pointBorderColor:"#fff",pointHoverBackgroundColor:"#fff",pointHoverBorderColor:"rgba(181,181,181,1)",data:c}]},options:{maintainAspectRatio:!1,scales:{yAxes:[{ticks:{suggestedMin:0,suggestedMax:400}}]},tooltips:{intersect:!1,callbacks:{label:function(t,e){return" $"+t.yLabel}}}}})}),jQuery('a[href="#crypto-coins-btc"]',"ul#crypto-tabs").tab("show")}},{key:"init",value:function(){this.initChartsCrypto()}}],(r=null)&&o(e.prototype,r),n&&o(e,n),t}();jQuery(function(){r.init()})}}); |