1import {nFormatter, rateHolder} from './global.js'; 2import './reviewslist.js'; 3import './feedback.js'; 4import './bonuseslist.js'; 5import './wageringcalculator.js'; 6import './bonus.js'; 7import './libs/chart.js'; 8import './libs/chartjs-chart-treemap.js'; 9 10$(document).ready(function() { 11 12 rateHolder('.banking-stats .item-rating'); 13 14 function bitcoinChart(chart) { 15 let chartDataUSD = chart.data('usd').split(','); 16 let chartDataEUR = chart.data('eur').split(','); 17 let chartDataCAD = chart.data('cad').split(','); 18 let chartDataAUD = chart.data('aud').split(','); 19 let chartLabels = chart.data('labels'); 20 let tooltipName = chart.data('tooltip'); 21 if (chartLabels.toString().indexOf(',') != -1) { 22 chartLabels = chartLabels.split(','); 23 } 24 let chartVar = 'myChart'+chart.attr('id'); 25 chartVar = new Chart(chart.attr('id'), { 26 type: 'line', 27 data: { 28 labels: chartLabels, 29 datasets: [ 30 { 31 label: 'USD', 32 data: chartDataUSD, 33 fill: false, 34 borderColor: '#e65431', 35 pointBackgroundColor: '#e65431', 36 pointRadius: 4, 37 }, 38 { 39 label: 'EUR', 40 data: chartDataEUR, 41 fill: false, 42 borderColor: '#37a8d8', 43 backgroundColor: '#37a8d8', 44 pointStyle: 'rectRot', 45 pointRadius: 4, 46 }, 47 { 48 label: 'CAD', 49 data: chartDataCAD, 50 fill: false, 51 borderColor: '#bdd548', 52 backgroundColor: '#bdd548', 53 pointStyle: 'rect', 54 pointRadius: 5, 55 }, 56 { 57 label: 'AUD', 58 data: chartDataAUD, 59 fill: false, 60 borderColor: '#fdbe00', 61 backgroundColor: '#fdbe00', 62 pointStyle: 'triangle', 63 pointRadius: 5, 64 65 } 66 ] 67 }, 68 options: { 69 responsive: true, 70 legend: { 71 position: 'bottom', 72 labels: { 73 usePointStyle: true, 74 }, 75 }, 76 scales: { 77 yAxes: [{ 78 ticks: { 79 fontColor: '#666', 80 maxTicksLimit: 6, 81 fontSize: 11, 82 fontFamily: 'MontserratBold', 83 callback: function(value) { 84 return nFormatter(value); 85 } 86 }, 87 }], 88 xAxes: [{ 89 gridLines: { 90 display: false 91 }, 92 ticks: { 93 fontColor: '#666', 94 fontSize: 11, 95 fontFamily: 'MontserratBold', 96 maxRotation: 90, 97 minRotation: 90 98 } 99 }] 100 }, 101 102 maintainAspectRatio: false, 103 tooltips: { 104 callbacks: { 105 title: function() { 106 return '1 ' + tooltipName; 107 }, 108 } 109 }, 110 } 111 }); 112 } 113 114 let interval = setInterval(function(){ 115 let canvas = $('#bitcoinChart'); 116 if (canvas.length > 0) { 117 bitcoinChart(canvas); 118 clearInterval(interval) 119 } 120 }, 100) 121 122 if($('#paymentratingChart').length > 0) { 123 const chartData = $('#paymentratingChart').data('charts').split(','); 124 let chartDataArray = []; 125 const thisChart = $('#paymentratingChart'); 126 let terrible = thisChart.data('terrible'); 127 let dislike = thisChart.data('dislike'); 128 let average = thisChart.data('average'); 129 let ok = thisChart.data('ok'); 130 let like = thisChart.data('like'); 131 let awesome = thisChart.data('awesome'); 132 $.each(chartData, function(index, item) { 133 chartDataArray.push(parseFloat(item)); 134 }); 135 const myChart = new Chart($('#paymentratingChart'), { 136 type: 'treemap', 137 data: { 138 datasets: [ 139 { 140 tree: [ 141 {value: chartDataArray[0], title: awesome, background: '#5bac5c'}, 142 {value: chartDataArray[1], title: like, background: '#bcd447'}, 143 {value: chartDataArray[2], title: ok, background: '#fdbe00'}, 144 {value: chartDataArray[3], title: average, background: '#ff8a2b'}, 145 {value: chartDataArray[4], title: dislike, background: '#e65431'}, 146 {value: chartDataArray[5], title: terrible, background: '#b62806'} 147 ], 148 key: 'value', 149 groups: ['title'], 150 fontColor: 'white', 151 borderWidth: 0, 152 backgroundColor: function(ctx) { 153 return ctx.dataset.data[ctx.dataIndex]._data.children[0].background; 154 }, 155 fontSize: function(ctx) { 156 if(ctx.dataset.data[ctx.dataIndex].h < 50 ) { 157 return 6; 158 } 159 else if(ctx.dataset.data[ctx.dataIndex].w < 100 ) { 160 return 10; 161 } else { 162 return 20; 163 } 164 } 165 }], 166 }, 167 options: { 168 legend: false, 169 tooltips: false 170 } 171 }); 172 }
173 $(document).on('click', '.banking-details-table .more-link', function(event) { 174 event.preventDefault(); 175 $(this).parent().find('.hide').removeClass('hide'); 176 $(this).remove(); 177 }); 178});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.