Commit 6c678fb2 authored by Derek Schultz's avatar Derek Schultz

Add tooltip ungrouping for multiple X. Fix #628.

parent 313ed15d
...@@ -2281,15 +2281,23 @@ ...@@ -2281,15 +2281,23 @@
selectedData = sameXData.map(function (d) { selectedData = sameXData.map(function (d) {
return $$.addName(d); return $$.addName(d);
}); });
if (config.tooltip_grouped) {
$$.showTooltip(selectedData, mouse); $$.showTooltip(selectedData, mouse);
}
else {
$$.showTooltip([closest], mouse);
}
// expand points // expand points
if (config.point_focus_expand_enabled) { if (config.point_focus_expand_enabled) {
$$.expandCircles(closest.index, closest.id, true); $$.expandCircles(closest.index, closest.id, true);
} }
if (config.tooltip_grouped) {
// Show xgrid focus line // Show xgrid focus line
$$.showXGridFocus(selectedData); $$.showXGridFocus(selectedData);
}
// Show cursor as pointer if point is close to mouse position // Show cursor as pointer if point is close to mouse position
if ($$.dist(closest, mouse) < 100) { if ($$.dist(closest, mouse) < 100) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -271,15 +271,23 @@ c3_chart_internal_fn.generateEventRectsForMultipleXs = function (eventRectEnter) ...@@ -271,15 +271,23 @@ c3_chart_internal_fn.generateEventRectsForMultipleXs = function (eventRectEnter)
selectedData = sameXData.map(function (d) { selectedData = sameXData.map(function (d) {
return $$.addName(d); return $$.addName(d);
}); });
if (config.tooltip_grouped) {
$$.showTooltip(selectedData, mouse); $$.showTooltip(selectedData, mouse);
}
else {
$$.showTooltip([closest], mouse);
}
// expand points // expand points
if (config.point_focus_expand_enabled) { if (config.point_focus_expand_enabled) {
$$.expandCircles(closest.index, closest.id, true); $$.expandCircles(closest.index, closest.id, true);
} }
if (config.tooltip_grouped) {
// Show xgrid focus line // Show xgrid focus line
$$.showXGridFocus(selectedData); $$.showXGridFocus(selectedData);
}
// Show cursor as pointer if point is close to mouse position // Show cursor as pointer if point is close to mouse position
if ($$.dist(closest, mouse) < 100) { if ($$.dist(closest, mouse) < 100) {
......
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