Skip to content

Commit

Permalink
bug fix for colour schemes
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-combe committed Nov 15, 2017
1 parent af3faad commit 5efcab4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions build/complexviewer.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/controller/Controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -985,15 +985,15 @@ xiNET.Controller.prototype.setAnnotations = function(annotationChoice) {
for (m = 0; m < molCount; m++) {
var mol = mols[m];
for (var a = 0; a < mol.annotations.length; a++){
categories.add(mol.annotations[a].name);
categories.add(mol.annotations[a].description);
}
}
var catCount = categories.values().length;

var colourScheme;// = null;
if (catCount < 3){catCount = 3;}
//~ if (catCount < 21) {
if (catCount < 6) {
if (catCount < 5) {
//~ var reversed = colorbrewer.Accent[catCount].slice().reverse();
//~ colourScheme = d3.scale.ordinal().range(reversed);
colourScheme = d3.scale.ordinal().range(colorbrewer.Set1[4]);
Expand Down

0 comments on commit 5efcab4

Please sign in to comment.