This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
var svg = $('.player-chart-container svg'); //selector is valid only for charts under Trends pages | |
if (typeof (svg[0]) !== 'undefined') { //if there is no graph in page, do nothing | |
$('#trendline').remove(); //remove previously drawn line | |
var points = $('circle'); //get all graph points | |
//calculate parameters needed for trendline | |
var cnt = points.length; | |
var sumx, sumy, sumx2, sumxy; | |
sumx = sumy = sumx2 = sumxy = 0; | |
points.each(function () { |
NewerOlder