function renderVerbs(verbs) {
    // For each new verb we add an LI and inside a link to show/hide and a span
    // to show the color-coded verb name.
    var list = d3.select("#verbs"),
        selection = list.selectAll("li").data(verbs),
        li = selection.enter().append("li");
    li.append("a")
      .attr("class", "show")
      .on("click", function(verb) {
        d3.event.stopPropagation();
        // If the class is "show", we're showing the verb. Flip class to hide
        // and turn verbsShowing off.
        if (this.className == "show") {
          this.className = "hide";
          verbsShowing[verb] = false;
        } else {
          this.className = "show";
          verbsShowing[verb] = true;
        }
        // Update all activities accordingly.
        renderActivities();
        return false;
      });
    li.append("span")
      .text(String)
      .style("background-color", function(verb) { return verbColor(verbs, verb) });
    selection.exit().remove();
  }
function renderVerbs(verbs) {
    
    
    var list = d3.select("#verbs"),
        selection = list.selectAll("li").data(verbs),
        li = selection.enter().append("li");
    li.append("a")
      .attr("class", "show")
      .on("click", function(verb) {
        d3.event.stopPropagation();
        
        
        if (this.className == "show") {
          this.className = "hide";
          verbsShowing[verb] = false;
        } else {
          this.className = "show";
          verbsShowing[verb] = true;
        }
        
        renderActivities();
        return false;
      });
    li.append("span")
      .text(String)
      .style("background-color", function(verb) { return verbColor(verbs, verb) });
    selection.exit().remove();
  }
function renderVerbs ( verbs ) { // For each new verb we add an LI and inside a link to show/hide and a span // to show the color-coded verb name. var list = d3 . select ( "#verbs" ) , selection = list . selectAll ( "li" ) . data ( verbs ) , li = selection . enter ( ) . append ( "li" ) ; li . append ( "a" ) . attr ( "class" , "show" ) . on ( "click" , function ( verb ) { d3 . event . stopPropagation ( ) ; // If the class is "show", we're showing the verb. Flip class to hide // and turn verbsShowing off. if ( this . className == "show" ) { this . className = "hide" ; verbsShowing [ verb ] = false ; } else { this . className = "show" ; verbsShowing [ verb ] = true ; } // Update all activities accordingly. renderActivities ( ) ; return false ; } ) ; li . append ( "span" ) . text ( String ) . style ( "background-color" , function ( verb ) { return verbColor ( verbs , verb ) } ) ; selection . exit ( ) . remove ( ) ; }
Renders the verb selector: shows the msot popular verbs with option to show/hide each one.
Renders the verb selector : shows the msot popular verbs with option to show / hide each one .