diff --git a/README.md b/README.md index 171257d..5dc250d 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/jscomut.js b/jscomut.js index d6bc06c..662ce3c 100755 --- a/jscomut.js +++ b/jscomut.js @@ -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') diff --git a/jscomutdemo.js b/jscomutdemo.js index 8fa3738..f01a1fd 100755 --- a/jscomutdemo.js +++ b/jscomutdemo.js @@ -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 + }, }); $('