Browse Source

Fix grouped tooltip ignored for scatter

pull/1555/head
Sébastien Castiel 9 years ago
parent
commit
71042ae265
  1. 2
      src/data.js
  2. 2
      src/grid.js

2
src/data.js

@ -47,7 +47,7 @@ c3_chart_internal_fn.hasMultipleX = function (xs) {
return this.d3.set(Object.keys(xs).map(function (id) { return xs[id]; })).size() > 1; return this.d3.set(Object.keys(xs).map(function (id) { return xs[id]; })).size() > 1;
}; };
c3_chart_internal_fn.isMultipleX = function () { c3_chart_internal_fn.isMultipleX = function () {
return notEmpty(this.config.data_xs) || !this.config.data_xSort || this.hasType('scatter'); return notEmpty(this.config.data_xs) || !this.config.data_xSort;// || this.hasType('scatter');
}; };
c3_chart_internal_fn.addName = function (data) { c3_chart_internal_fn.addName = function (data) {
var $$ = this, name; var $$ = this, name;

2
src/grid.js

@ -174,7 +174,7 @@ c3_chart_internal_fn.showXGridFocus = function (selectedData) {
xx = $$.xx.bind($$); xx = $$.xx.bind($$);
if (! config.tooltip_show) { return; } if (! config.tooltip_show) { return; }
// Hide when scatter plot exists // Hide when scatter plot exists
if ($$.hasType('scatter') || $$.hasArcType()) { return; } if (/*$$.hasType('scatter') || */$$.hasArcType()) { return; }
focusEl focusEl
.style("visibility", "visible") .style("visibility", "visible")
.data([dataToShow[0]]) .data([dataToShow[0]])

Loading…
Cancel
Save