' + this.point.name + ' Rekt: ' + '$' + formatNumberShort(Math.abs(this.y)); }); return s; }, shared: true }, series: [{ name: 'Longs', color: 'green', borderColor: '#23262b', tooltip: { valueSuffix: ' USD' } }, { name: 'Shorts', color: 'red', borderColor: '#23262b', type: 'column', tooltip: { valueSuffix: ' USD' } }], legend: { enabled: false, }, credits: { enabled: false }, }; chart_2 = jQuery.extend(true, {}, chart_2); var chart_2 = new Highcharts.Chart(chart_2); $('.selectReqLiq').on('change', function() { $(".selectReqLiq").val(this.value); symbol = $('#symbols_liq option:selected').val(); ajax_call({ symbol: symbol, type: 'liq' }); chart_1.setTitle({ text: this.value + " Liquidations by Exchange" }); chart_2.setTitle({ text: this.value + " Liquidations" }); }); ajax_call({ symbol: $(".selectReqLiq").val(), type: 'liq' }); function ajax_call(data) { ajaxRequest({ url: `liquidation`, method: "GET", data: data, beforeSendCallback: function(xhr) { $("#chartX").css({ opacity: 0.3 }); }, }) .then((response) => { var liq_td = ''; var longs_total = 0; var shorts_total = 0; var pie_chart = []; if (response.chart) { } if (response.liq) { for (var i in response.liq) { longs = response.liq[i]['longs'] == undefined ? 0 : response.liq[i]['longs']; shorts = response.liq[i]['shorts'] == undefined ? 0 : response.liq[i]['shorts']; longs_total += longs; shorts_total += shorts; pie_chart.push({ name: response.liq[i]['info']['e'], y: longs + shorts }); liq_td += `