          name: label
                  };
                  if(barPlot){
                      trace['type'] = "bar";
                  }
                  data.push(trace);
              }
              
          }
          return data;
      }
      function toCompareData(dataParam, compareWithWorst) {
          var data = $.extend(true, [], dataParam);
          var worstSoFarMap = {};
          var defaultSoFarValue = compareWithWorst ? Number.MAX_VALUE : Number.MIN_VALUE;
          function getWorst