Browse Source

Fix lint

pull/2246/head
Masayuki Tanaka 7 years ago
parent
commit
df1e3d0d1c
  1. 1
      src/api.tooltip.js
  2. 2
      src/axis.js
  3. 4
      src/shape.js
  4. 6
      src/subchart.js
  5. 2
      src/text.js
  6. 2
      src/zoom.js

1
src/api.tooltip.js

@ -1,5 +1,4 @@
import { c3_chart_fn } from './core'; import { c3_chart_fn } from './core';
import { isValue } from './util';
c3_chart_fn.tooltip = function () {}; c3_chart_fn.tooltip = function () {};
c3_chart_fn.tooltip.show = function (args) { c3_chart_fn.tooltip.show = function (args) {

2
src/axis.js

@ -223,8 +223,8 @@ c3_axis_internal_fn.generateAxis = function () {
return internal.tspanData(d, i, scale1); return internal.tspanData(d, i, scale1);
}), }),
tspanEnter = tspans.enter().append('tspan'), tspanEnter = tspans.enter().append('tspan'),
tspanExit = tspans.exit().remove(),
tspanUpdate = tspanEnter.merge(tspans).text(function (d) { return d.splitted; }); tspanUpdate = tspanEnter.merge(tspans).text(function (d) { return d.splitted; });
tspans.exit().remove();
var path = g.selectAll(".domain").data([ 0 ]), var path = g.selectAll(".domain").data([ 0 ]),
pathUpdate = path.enter().append("path").merge(path).attr("class", "domain"); pathUpdate = path.enter().append("path").merge(path).attr("class", "domain");

4
src/shape.js

@ -98,13 +98,13 @@ c3_chart_internal_fn.getInterpolate = function (d) {
type; type;
if ($$.isSplineType(d)) { if ($$.isSplineType(d)) {
type = types[$$.config.spline_interpolation_type] || types['cardinal']; type = types[$$.config.spline_interpolation_type] || types.cardinal;
} }
else if ($$.isStepType(d)) { else if ($$.isStepType(d)) {
type = types[$$.config.line_step_type]; type = types[$$.config.line_step_type];
} }
else { else {
type = types["linear"]; type = types.linear;
} }
return type; return type;
}; };

6
src/subchart.js

@ -143,7 +143,7 @@ c3_chart_internal_fn.updateBarForSubchart = function (durationForExit) {
.attr("class", $$.classBar.bind($$)) .attr("class", $$.classBar.bind($$))
.style("stroke", 'none') .style("stroke", 'none')
.style("fill", $$.color); .style("fill", $$.color);
var contextBarExit = contextBar.exit().transition().duration(durationForExit) contextBar.exit().transition().duration(durationForExit)
.style('opacity', 0) .style('opacity', 0)
.remove(); .remove();
$$.contextBar = contextBarEnter.merge(contextBar) $$.contextBar = contextBarEnter.merge(contextBar)
@ -161,7 +161,7 @@ c3_chart_internal_fn.updateLineForSubchart = function (durationForExit) {
var contextLineEnter = contextLine.enter().append('path') var contextLineEnter = contextLine.enter().append('path')
.attr('class', $$.classLine.bind($$)) .attr('class', $$.classLine.bind($$))
.style('stroke', $$.color); .style('stroke', $$.color);
var contextLineExit = contextLine.exit().transition().duration(durationForExit) contextLine.exit().transition().duration(durationForExit)
.style('opacity', 0) .style('opacity', 0)
.remove(); .remove();
$$.contextLine = contextLineEnter.merge(contextLine) $$.contextLine = contextLineEnter.merge(contextLine)
@ -180,7 +180,7 @@ c3_chart_internal_fn.updateAreaForSubchart = function (durationForExit) {
.attr("class", $$.classArea.bind($$)) .attr("class", $$.classArea.bind($$))
.style("fill", $$.color) .style("fill", $$.color)
.style("opacity", function () { $$.orgAreaOpacity = +d3.select(this).style('opacity'); return 0; }); .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) .style('opacity', 0)
.remove(); .remove();
$$.contextArea = contextAreaEnter.merge(contextArea) $$.contextArea = contextAreaEnter.merge(contextArea)

2
src/text.js

@ -20,7 +20,7 @@ c3_chart_internal_fn.updateTargetsForText = function (targets) {
.style("pointer-events", "none"); .style("pointer-events", "none");
mainTextEnter.append('g') mainTextEnter.append('g')
.attr('class', classTexts); .attr('class', classTexts);
var mainTextUpdate = mainTextEnter.merge(mainText) mainTextEnter.merge(mainText)
.attr('class', function (d) { return classChartText(d) + classFocus(d); }); .attr('class', function (d) { return classChartText(d) + classFocus(d); });
}; };
c3_chart_internal_fn.updateText = function (xForText, yForText, durationForExit) { c3_chart_internal_fn.updateText = function (xForText, yForText, durationForExit) {

2
src/zoom.js

@ -1,6 +1,4 @@
import CLASS from './class';
import { c3_chart_internal_fn } from './core'; import { c3_chart_internal_fn } from './core';
import { diffDomain } from './util';
c3_chart_internal_fn.initZoom = function () { c3_chart_internal_fn.initZoom = function () {
var $$ = this, d3 = $$.d3, config = $$.config, startEvent; var $$ = this, d3 = $$.d3, config = $$.config, startEvent;

Loading…
Cancel
Save