From 1b6d2c2895e8750408992ffd42d70326b80ca624 Mon Sep 17 00:00:00 2001 From: lbortoli Date: Wed, 6 May 2015 12:02:09 -0300 Subject: [PATCH] Add chart.api ($$.api) to 'onunselected' callback It should behave as the 'onselected' callback. --- src/selection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/selection.js b/src/selection.js index e9b4ada..e538763 100644 --- a/src/selection.js +++ b/src/selection.js @@ -18,7 +18,7 @@ c3_chart_internal_fn.selectPoint = function (target, d, i) { }; c3_chart_internal_fn.unselectPoint = function (target, d, i) { var $$ = this; - $$.config.data_onunselected(d, target.node()); + $$.config.data_onunselected.call($$.api, d, target.node()); // remove selected-circle from low layer g $$.main.select('.' + CLASS.selectedCircles + $$.getTargetSelectorSuffix(d.id)).selectAll('.' + CLASS.selectedCircle + '-' + i) .transition().duration(100).attr('r', 0)