score:1

Accepted answer

Is this what you're looking for?

Plunkr

Relevant code changes:

  1. The whole dataset was being passed to the getRecordContent function. So I changed that: when hovered over "admissions", pass "transfers" and "codependents". (line: 435)

    var filtered_dataset = dataset.filter(function(row){return row.record !== d.record; });
    for (var i = 0; i < filtered_dataset.length; i++) {
       content += getRecordContent(filtered_dataset[i], idx); 
    }
    
  2. Seems like you need to specify the state name as well along with the record. (line 480)

    return '<li><span class="record-label">' + obj.state + ' ' + obj.record.toLowerCase() + '</span><span class="record-value">' + numFormat(obj.values[pos].y) + '</span></li>'    
    

Edit:

  1. Changes made for the tooltip to adapt to the main chart as well:

    var filtered_dataset = dataset.filter(function(row){return row.record !== d.record && row.state === d.state; });
    
  2. Changed z-index for the tooltip in main.css (try removing it and hovering close to the jquery slider)

    z-index: 2;
    

Hope this helps. :)


Related Query