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

28 lines (17 loc) 762 B
module.exports = function make_view_request(params, requested_view){ // this will add all necessary information to a view request // it will grab necessary view information from the sliders // only one component will be changed at a time var changed_component = _.keys(requested_view)[0]; // add additional filter information from othe possible filters _.each( _.keys(params.viz.possible_filters), function(inst_filter){ if (inst_filter != changed_component){ if (!d3.select(params.root+' .slider_'+inst_filter).empty()){ var inst_state = d3.select(params.root+' .slider_'+inst_filter) .attr('current_state'); requested_view[inst_filter] = inst_state; } } }); return requested_view; };