Skip to content

Commit

Permalink
v1.18.1 fixed colorbar bug and improved size
Browse files Browse the repository at this point in the history
  • Loading branch information
cornhundred committed Jun 8, 2017
1 parent 466bec0 commit 8e3cada
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 18 deletions.
11 changes: 6 additions & 5 deletions clustergrammer.js

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

2 changes: 1 addition & 1 deletion clustergrammer.min.js

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions clustergrammer.node.js

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

2 changes: 1 addition & 1 deletion clustergrammer.node.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "clustergrammer",
"version": "v1.18.0",
"version": "v1.18.1",
"description": "This is a clustergram implemented in D3.js. I started from the example http://bost.ocks.org/mike/miserables/ and added the following features",
"main": "clustergrammer.node.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var awesomplete = require('awesomplete');
require('!style!css!./d3.slider/d3.slider.css');
require('!style!css!awesomplete/awesomplete.css');

/* clustergrammer v1.18.0
/* clustergrammer v1.18.1
* Nicolas Fernandez, Ma'ayan Lab, Icahn School of Medicine at Mount Sinai
* (c) 2017
*/
Expand Down
9 changes: 5 additions & 4 deletions src/sidebar/make_colorbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = function make_colorbar(cgm){


var colorbar_width = params.sidebar.width - 20;
var colorbar_height = 15;
var colorbar_height = 13;
var svg_height = 3*colorbar_height;
var svg_width = 1.2*colorbar_width;
var low_left_margin = 10 ;
Expand Down Expand Up @@ -111,6 +111,7 @@ module.exports = function make_colorbar(cgm){
///////////////

var max_abs_val = Math.abs( Math.round(params.matrix.max_link * 10) /10);
var font_size = 13;

main_svg
.append('text')
Expand All @@ -125,7 +126,7 @@ module.exports = function make_colorbar(cgm){
})
.style('font-family', '"Helvetica Neue", Helvetica, Arial, sans-serif')
.style('font-weight', 300)
.style('font-size', 15)
.style('font-size', font_size)
.attr('transform', 'translate('+low_left_margin+','+top_margin+')')
.attr('text-anchor', 'start');

Expand All @@ -137,13 +138,13 @@ module.exports = function make_colorbar(cgm){
if (special_case === 'all_negative'){
inst_string = 0;
} else {
inst_string= '-' + max_abs_val.toLocaleString();
inst_string= max_abs_val.toLocaleString();
}
return inst_string;
})
.style('font-family', '"Helvetica Neue", Helvetica, Arial, sans-serif')
.style('font-weight', 300)
.style('font-size', 15)
.style('font-size', font_size)
.attr('transform', 'translate('+high_left_margin+','+top_margin+')')
.attr('text-anchor', 'end');
};

0 comments on commit 8e3cada

Please sign in to comment.