<commit_before>
function drawGraphs(statNames, containerId, interval, start, end) {
  if (typeof(statNames) == "string") {
    drawGraph([statNames], containerId, interval, start, end);
  } else {
    drawGraph(statNames, containerId, interval, start, end);
  }
}

function drawGraph(statNames, containerId, interval, start, end) {
  var series = [], type = "area";
  var colors = ["steelblue", "red", "green", "yellow", "orange", "cyan", "darkgray", "lawngreen", "midnightblue", "cadetblue"];
  $.each(statNames, function(i, statName) {
    series.push({name : statName, color : colors[i]});
  });
  if (!interval) {
    interval = 604800000;
  }
  if (typeof(end) != "object") {
    end = new Date();
    start = new Date(2011, 9, 1);
  }
  if (statNames.length > 1) {
    type = "line";
  }
  var url = "/services/stats/counts/" + encodeURIComponent(statNames.join(",")) + "?start=" +
      start.getTime() +
      "&interval=" + interval +
      "&end=" + end.getTime();
  new Rickshaw.Graph.Ajax({
    element: document.getElementById(containerId),
    width: $("#" + containerId).width() - 20,
    height: 200,
    renderer: type,
    stroke: true,
    dataURL: url,
    onData: function(d) {
      return d
    },
    onComplete: function(transport) {
      var graph = transport.graph;
      graph.renderer.unstack = true;
      var xAxis = new Rickshaw.Graph.Axis.Time({ graph: graph });
      xAxis.render();
      var yAxis = new Rickshaw.Graph.Axis.Y({ graph: graph });
      yAxis.render();
    },
    series: series
  });
}<commit_msg>Added hover detail to graphs<commit_after>
function drawGraphs(statNames, containerId, interval, start, end) {
  if (typeof(statNames) == "string") {
    drawGraph([statNames], containerId, interval, start, end);
  } else {
    drawGraph(statNames, containerId, interval, start, end);
  }
}

function drawGraph(statNames, containerId, interval, start, end) {
  var series = [], type = "area";
  var colors = ["steelblue", "red", "green", "yellow", "orange", "cyan", "darkgray", "lawngreen", "midnightblue", "cadetblue"];
  $.each(statNames, function(i, statName) {
    series.push({name : statName, color : colors[i]});
  });
  if (!interval) {
    interval = 604800000;
  }
  if (typeof(end) != "object") {
    end = new Date();
    start = new Date(2011, 9, 1);
  }
  if (statNames.length > 1) {
    type = "line";
  }
  var url = "/services/stats/counts/" + encodeURIComponent(statNames.join(",")) + "?start=" +
      start.getTime() +
      "&interval=" + interval +
      "&end=" + end.getTime();
  new Rickshaw.Graph.Ajax({
    element: document.getElementById(containerId),
    width: $("#" + containerId).width() - 20,
    height: 200,
    renderer: type,
    stroke: true,
    dataURL: url,
    onData: function(d) {
      return d
    },
    onComplete: function(transport) {
      var graph = transport.graph, xAxis, yAxis;
      graph.renderer.unstack = true;
      new Rickshaw.Graph.HoverDetail({ graph: graph });
      xAxis = new Rickshaw.Graph.Axis.Time({ graph: graph });
      xAxis.render();
      yAxis = new Rickshaw.Graph.Axis.Y({ graph: graph });
      yAxis.render();
    },
    series: series
  });
}
{'fraction_non_alphanumeric': 0.1725984251968504, 'fraction_numerical': 0.013228346456692913, 'mean_word_length': 3.2688172043010755, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6792320', 'n_tokens_mistral': 1092, 'n_tokens_neox': 1056, 'n_words': 252}