diff --git a/src/api.tooltip.js b/src/api.tooltip.js index 5ade853..244ede3 100644 --- a/src/api.tooltip.js +++ b/src/api.tooltip.js @@ -1,5 +1,4 @@ import { c3_chart_fn } from './core'; -import { isValue } from './util'; c3_chart_fn.tooltip = function () {}; c3_chart_fn.tooltip.show = function (args) { diff --git a/src/axis.js b/src/axis.js index 64f6096..3593635 100644 --- a/src/axis.js +++ b/src/axis.js @@ -223,8 +223,8 @@ c3_axis_internal_fn.generateAxis = function () { return internal.tspanData(d, i, scale1); }), tspanEnter = tspans.enter().append('tspan'), - tspanExit = tspans.exit().remove(), tspanUpdate = tspanEnter.merge(tspans).text(function (d) { return d.splitted; }); + tspans.exit().remove(); var path = g.selectAll(".domain").data([ 0 ]), pathUpdate = path.enter().append("path").merge(path).attr("class", "domain"); diff --git a/src/shape.js b/src/shape.js index 8afe738..b0f403f 100644 --- a/src/shape.js +++ b/src/shape.js @@ -98,13 +98,13 @@ c3_chart_internal_fn.getInterpolate = function (d) { type; if ($$.isSplineType(d)) { - type = types[$$.config.spline_interpolation_type] || types['cardinal']; + type = types[$$.config.spline_interpolation_type] || types.cardinal; } else if ($$.isStepType(d)) { type = types[$$.config.line_step_type]; } else { - type = types["linear"]; + type = types.linear; } return type; }; diff --git a/src/subchart.js b/src/subchart.js index e76f17e..ee6f956 100644 --- a/src/subchart.js +++ b/src/subchart.js @@ -143,7 +143,7 @@ c3_chart_internal_fn.updateBarForSubchart = function (durationForExit) { .attr("class", $$.classBar.bind($$)) .style("stroke", 'none') .style("fill", $$.color); - var contextBarExit = contextBar.exit().transition().duration(durationForExit) + contextBar.exit().transition().duration(durationForExit) .style('opacity', 0) .remove(); $$.contextBar = contextBarEnter.merge(contextBar) @@ -161,7 +161,7 @@ c3_chart_internal_fn.updateLineForSubchart = function (durationForExit) { var contextLineEnter = contextLine.enter().append('path') .attr('class', $$.classLine.bind($$)) .style('stroke', $$.color); - var contextLineExit = contextLine.exit().transition().duration(durationForExit) + contextLine.exit().transition().duration(durationForExit) .style('opacity', 0) .remove(); $$.contextLine = contextLineEnter.merge(contextLine) @@ -180,7 +180,7 @@ c3_chart_internal_fn.updateAreaForSubchart = function (durationForExit) { .attr("class", $$.classArea.bind($$)) .style("fill", $$.color) .style("opacity", function () { $$.orgAreaOpacity = +d3.select(this).style('opacity'); return 0; }); - var contextAreaExit = contextArea.exit().transition().duration(durationForExit) + contextArea.exit().transition().duration(durationForExit) .style('opacity', 0) .remove(); $$.contextArea = contextAreaEnter.merge(contextArea) diff --git a/src/text.js b/src/text.js index d0dcf67..38f0d74 100644 --- a/src/text.js +++ b/src/text.js @@ -20,7 +20,7 @@ c3_chart_internal_fn.updateTargetsForText = function (targets) { .style("pointer-events", "none"); mainTextEnter.append('g') .attr('class', classTexts); - var mainTextUpdate = mainTextEnter.merge(mainText) + mainTextEnter.merge(mainText) .attr('class', function (d) { return classChartText(d) + classFocus(d); }); }; c3_chart_internal_fn.updateText = function (xForText, yForText, durationForExit) { diff --git a/src/zoom.js b/src/zoom.js index 2dcab41..446347c 100644 --- a/src/zoom.js +++ b/src/zoom.js @@ -1,6 +1,4 @@ -import CLASS from './class'; import { c3_chart_internal_fn } from './core'; -import { diffDomain } from './util'; c3_chart_internal_fn.initZoom = function () { var $$ = this, d3 = $$.d3, config = $$.config, startEvent;