Skip to content

Commit

Permalink
added background bars with zero opacity
Browse files Browse the repository at this point in the history
  • Loading branch information
cornhundred committed Dec 9, 2016
1 parent 16c94a7 commit 2bcb76d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 28 deletions.
25 changes: 10 additions & 15 deletions clustergrammer.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 17 additions & 13 deletions src/labels/make_row_cat_super_labels.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,20 +83,24 @@ module.exports = function make_row_cat_super_labels(cgm){
});
// .on('mouseover', cat_tip.show)

var unit_length = extra_y_room * viz.cat_room.symbol_width;
var bar_width = unit_length * 0.9;

// // optional bar behind name
// ///////////////////////////////
// d3.select('.row_cat_label_bars')
// .append('rect')
// .style('height','12px')
// .style('width','70px')
// .style('opacity',0.5)
// .attr('transform', function(d){
// // var inst_y = extra_y_room*viz.cat_room.symbol_width
// // * parseInt( d.split('-')[1], 10 );
// var inst_y = -10;
// return 'translate(0,'+inst_y+')';
// });
// optional bar behind name
///////////////////////////////
d3.select('.row_cat_label_bars')
.selectAll()
.data(viz.all_cats.row)
.enter()
.append('rect')
.style('height', bar_width +'px')
.style('width','70px')
.style('opacity',0.0)
.attr('transform', function(d){
var inst_y = unit_length * (parseInt( d.split('-')[1], 10 ) -0.75 );
// var inst_y = -10;
return 'translate(0,'+inst_y+')';
});


}
Expand Down

0 comments on commit 2bcb76d

Please sign in to comment.