Commit e80e01ea authored by Masayuki Tanaka's avatar Masayuki Tanaka

Fix focus legend

parent bb6536b8
c3_chart_fn.focus = function (targetIds) { c3_chart_fn.focus = function (targetIds) {
var $$ = this.internal, candidates; var $$ = this.internal, candidates;
targetIds = $$.mapToTargetIds(targetIds).filter($$.isTargetToShow, $$); targetIds = $$.mapToTargetIds(targetIds);
candidates = $$.svg.selectAll($$.selectorTargets(targetIds)), candidates = $$.svg.selectAll($$.selectorTargets(targetIds.filter($$.isTargetToShow, $$))),
this.revert(); this.revert();
this.defocus(); this.defocus();
...@@ -21,8 +21,8 @@ c3_chart_fn.focus = function (targetIds) { ...@@ -21,8 +21,8 @@ c3_chart_fn.focus = function (targetIds) {
c3_chart_fn.defocus = function (targetIds) { c3_chart_fn.defocus = function (targetIds) {
var $$ = this.internal, candidates; var $$ = this.internal, candidates;
targetIds = $$.mapToTargetIds(targetIds).filter($$.isTargetToShow, $$); targetIds = $$.mapToTargetIds(targetIds);
candidates = $$.svg.selectAll($$.selectorTargets(targetIds)), candidates = $$.svg.selectAll($$.selectorTargets(targetIds.filter($$.isTargetToShow, $$))),
this.revert(); this.revert();
candidates.classed(CLASS.focused, false).classed(CLASS.defocused, true); candidates.classed(CLASS.focused, false).classed(CLASS.defocused, true);
...@@ -40,8 +40,8 @@ c3_chart_fn.defocus = function (targetIds) { ...@@ -40,8 +40,8 @@ c3_chart_fn.defocus = function (targetIds) {
c3_chart_fn.revert = function (targetIds) { c3_chart_fn.revert = function (targetIds) {
var $$ = this.internal, candidates; var $$ = this.internal, candidates;
targetIds = $$.mapToTargetIds(targetIds).filter($$.isTargetToShow, $$); targetIds = $$.mapToTargetIds(targetIds);
candidates = $$.svg.selectAll($$.selectorTargets(targetIds)); candidates = $$.svg.selectAll($$.selectorTargets(targetIds.filter($$.isTargetToShow, $$)));
candidates.classed(CLASS.focused, false).classed(CLASS.defocused, false); candidates.classed(CLASS.focused, false).classed(CLASS.defocused, false);
if ($$.hasArcType()) { if ($$.hasArcType()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment