diff --git a/c3.js b/c3.js index be59391..4f4d1bb 100644 --- a/c3.js +++ b/c3.js @@ -721,8 +721,8 @@ } function showXGridFocus(data) { - // Show when line chart exists - if (! hasLineType(c3.data.targets)) { return; } + // Hide when scatter plot exists + if (hasScatterType(c3.data.targets)) { return; } main.selectAll('line.xgrid-focus') .style("visibility", "visible") .data([data]) @@ -817,17 +817,17 @@ }); return has; } + /* not used function hasLineType(targets) { return hasType(targets, 'line'); } + */ function hasBarType(targets) { return hasType(targets, 'bar'); } - /* not used function hasScatterType(targets) { return hasType(targets, 'scatter'); } - */ function isLineType(d) { var id = (typeof d === 'string') ? d : d.id; return !(id in __data_types) || __data_types[id] === 'line' || __data_types[id] === 'spline'; diff --git a/c3.min.js b/c3.min.js index bfa5212..607f09d 100644 --- a/c3.min.js +++ b/c3.min.js @@ -15,7 +15,7 @@ null:+a[b],id:d}})}});b.forEach(function(a){var b;a.values=a.values.sort(functio function vb(a){var b=gb(),d;for(d=0;du[d].indexOf(c.id)))for(f=0;fu[d].indexOf(c.id)))for(f=0;f b?a-b:0};return function(a){var c=b?T(a.id):F(a.id);return d(c(a.value))}}function Oa(a,b){var d=s(a)?gb():a;"string"===typeof d&&(d=[d]);for(var f=0;f