Skip to content

Commit

Permalink
update sampleLegend.show documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
pearcetm committed Jun 29, 2024
1 parent 14a7aea commit 0af283d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ default_options = {
sampleLegend:{

height: 100,
show:'yes',//if not 'yes' a scale of zero will hide the labels
show: true, //if false (or falsey) a scale of zero will hide the labels
},

//colorLegend: defines the width of the legend of cell colors to the right of the grid.
Expand Down
2 changes: 1 addition & 1 deletion jscomut.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ function Comut() {
.append('g')
.attr('class', 'sample-legend')
.attr('transform', 'translate(0,' + (o-options.innerLayout.margins) + ')' +
' scale(1,' + (options.sampleLegend.show=='yes'?1:0) + ')');
' scale(1,' + (options.sampleLegend.show ? 1 : 0) + ')');

_this.colorLegend = _this.svg
.append('g')
Expand Down
4 changes: 4 additions & 0 deletions jscomutdemo.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ $(document).ready(function(){
var comut = new Comut();
comut.init({
target: '#widget',
sampleLegend:{
height: 200,
show: false, //if falsey a scale of zero will hide the labels
},
});
$('<button>', { class: 'btn btn-default' }).text('Randomize').on('click', function () { comut.randomize(); }).appendTo('#test-buttons');
$('<button>', { class: 'btn btn-default' }).text('Sort Samples').on('click', function () { comut.sort({ x: true }); }).appendTo('#test-buttons');
Expand Down

0 comments on commit 0af283d

Please sign in to comment.