From eaa30767ef5f8e0d7a31b837eb9129a0a14a3884 Mon Sep 17 00:00:00 2001 From: Smith Date: Wed, 29 Mar 2017 13:04:02 +0900 Subject: [PATCH] Mouse position of onclick event --- src/interaction.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interaction.js b/src/interaction.js index c6203d9..8d426c0 100644 --- a/src/interaction.js +++ b/src/interaction.js @@ -210,7 +210,7 @@ c3_chart_internal_fn.generateEventRectsForSingleX = function (eventRectEnter) { $$.main.selectAll('.' + CLASS.shape + '-' + index).each(function (d) { if (config.data_selection_grouped || $$.isWithinShape(this, d)) { $$.toggleShape(this, d, index); - $$.config.data_onclick.call($$.api, d, this); + $$.config.data_onclick.call($$.api, d, this, event); } }); }) @@ -309,7 +309,7 @@ c3_chart_internal_fn.generateEventRectsForMultipleXs = function (eventRectEnter) $$.main.selectAll('.' + CLASS.shapes + $$.getTargetSelectorSuffix(closest.id)).selectAll('.' + CLASS.shape + '-' + closest.index).each(function () { if (config.data_selection_grouped || $$.isWithinShape(this, closest)) { $$.toggleShape(this, closest, closest.index); - $$.config.data_onclick.call($$.api, closest, this); + $$.config.data_onclick.call($$.api, closest, this, event); } }); }