Skip to content

Commit

Permalink
fix legend color bug introduced in 0.6.4; see #34 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
timelyportfolio committed Apr 13, 2017
1 parent bec1bd3 commit 635ec7c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion inst/htmlwidgets/sunburst.js
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,9 @@ HTMLWidgets.widget({
var g = legend.selectAll("g")
.data( function(){
if(x.options.legendOrder !== null){
return x.options.legendOrder;
return x.options.legendOrder.map(function(d) {
return labels.filter(function(dd) {return dd.name === d })[0];
});
} else {
// get sorted by top level
return labels;
Expand Down

0 comments on commit 635ec7c

Please sign in to comment.