Commit d8e5e816 authored by Masayuki Tanaka's avatar Masayuki Tanaka

Fix tooltip when multiple xs on multiple charts - #758

parent 3c54adf6
...@@ -1787,8 +1787,8 @@ ...@@ -1787,8 +1787,8 @@
// find mouseovering bar // find mouseovering bar
values.filter(function (v) { return v && $$.isBarType(v.id); }).forEach(function (v) { values.filter(function (v) { return v && $$.isBarType(v.id); }).forEach(function (v) {
var shape = $$.d3.select('.' + CLASS.bars + $$.getTargetSelectorSuffix(v.id) + ' .' + CLASS.bar + '-' + v.index).node(); var shape = $$.main.select('.' + CLASS.bars + $$.getTargetSelectorSuffix(v.id) + ' .' + CLASS.bar + '-' + v.index).node();
if ($$.isWithinBar(shape)) { if (!closest && $$.isWithinBar(shape)) {
closest = v; closest = v;
} }
}); });
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -309,8 +309,8 @@ c3_chart_internal_fn.findClosest = function (values, pos) { ...@@ -309,8 +309,8 @@ c3_chart_internal_fn.findClosest = function (values, pos) {
// find mouseovering bar // find mouseovering bar
values.filter(function (v) { return v && $$.isBarType(v.id); }).forEach(function (v) { values.filter(function (v) { return v && $$.isBarType(v.id); }).forEach(function (v) {
var shape = $$.d3.select('.' + CLASS.bars + $$.getTargetSelectorSuffix(v.id) + ' .' + CLASS.bar + '-' + v.index).node(); var shape = $$.main.select('.' + CLASS.bars + $$.getTargetSelectorSuffix(v.id) + ' .' + CLASS.bar + '-' + v.index).node();
if ($$.isWithinBar(shape)) { if (!closest && $$.isWithinBar(shape)) {
closest = v; closest = v;
} }
}); });
......
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