ig.y[index] = (1.0 -(res / getWorstBestSoFar(xName))) * 100;
                }
            });
          });
          return data;
      }
      function toBetterThanWorstData(data){
        return toCompareData(data, true);
      }
      function toWorseThanBestData(data){
        return toCompareData(data, false);
      }
      function plotGraphs(){
          var insertPlaceholder = $("#insertPlaceholder");
          var sameSpacing = $('#sameSpacing').is(":checked");
          var barPlot = $('#barPlot