BestSoFar(x){
              return worstSoFarMap[x] === undefined ? defaultSoFarValue : worstSoFarMap[x];
          }
          function setWorstBestSoFar(x, y){
              return worstSoFarMap[x] = y;
          }
          function lessOrGreaterThan(n1, n2){
            return compareWithWorst ? n1 < n2 : n1 > n2;
          } 
          $.each(data, function(i, allResConfig) {
            $.each(allResConfig.y, function(index, res) {
                var xName = allResConfig.x[index];
                if(