|
|
|
@ -3046,6 +3046,7 @@
|
|
|
|
|
/*-- Draw Legend --*/ |
|
|
|
|
|
|
|
|
|
function focusLegend(id) { |
|
|
|
|
if(!__legend_show) { return; } |
|
|
|
|
var legendItem = legend.selectAll('.legend-item'), |
|
|
|
|
isTarget = function (d) { return !id || d === id; }, |
|
|
|
|
notTarget = function (d) { return !isTarget(d); }; |
|
|
|
@ -3053,6 +3054,7 @@
|
|
|
|
|
legendItem.filter(isTarget).transition().duration(100).style('opacity', 1); |
|
|
|
|
} |
|
|
|
|
function defocusLegend(id) { |
|
|
|
|
if(!__legend_show) { return; } |
|
|
|
|
var legendItem = legend.selectAll('.legend-item'), |
|
|
|
|
isTarget = function (d) { return !id || d === id; }, |
|
|
|
|
notTarget = function (d) { return !isTarget(d); }; |
|
|
|
@ -3060,6 +3062,7 @@
|
|
|
|
|
legendItem.filter(isTarget).transition().duration(100).style('opacity', 0.3); |
|
|
|
|
} |
|
|
|
|
function revertLegend() { |
|
|
|
|
if(!__legend_show) { return; } |
|
|
|
|
legend.selectAll('.legend-item') |
|
|
|
|
.transition().duration(100) |
|
|
|
|
.style('opacity', 1); |
|
|
|
|