UNPKG

clustergrammer

Version:

This is a clustergram implemented in D3.js. I started from the example http://bost.ocks.org/mike/miserables/ and added the following features

16 lines (13 loc) 380 B
module.exports = function num_visible_labels(params, inst_rc){ var group_name; if (inst_rc === 'row'){ group_name = 'group'; } else if (inst_rc === 'col') { group_name = 'text'; } var num_visible = d3.selectAll(params.root+' .'+inst_rc+'_label_'+group_name) .filter(function(){ return d3.select(this).style('display')!='none'; })[0].length; return num_visible; };