Browse Source

Errors reported by Travis CI, 3rd pass.

pull/254/head
Brandon Bernal 11 years ago
parent
commit
dadee8264a
  1. 22
      c3.js
  2. 2
      c3.min.js

22
c3.js

@ -997,7 +997,7 @@
if (isGaugeType(d.data)) { if (isGaugeType(d.data)) {
var sA = d.startAngle, eA = d.endAngle; var sA = d.startAngle, eA = d.endAngle;
var gMin = __gauge_min, gMax = __gauge_max, var gMin = __gauge_min, gMax = __gauge_max,
gF = Math.abs(gMin) + gMax, fA = Math.abs(sA) + eA, gF = Math.abs(gMin) + gMax,
aTic = (Math.PI) / gF; aTic = (Math.PI) / gF;
d.startAngle = (-1 * (Math.PI / 2)) + (aTic * Math.abs(gMin)); d.startAngle = (-1 * (Math.PI / 2)) + (aTic * Math.abs(gMin));
d.endAngle = d.startAngle + (aTic * ((d.value > gMax) ? gMax : d.value)); d.endAngle = d.startAngle + (aTic * ((d.value > gMax) ? gMax : d.value));
@ -2446,8 +2446,8 @@
if (__axis_rotated) { if (__axis_rotated) {
area = d3.svg.area() area = d3.svg.area()
.x0(function (d, i) { return yScaleGetter(d.id)(0); }) .x0(function (d) { return yScaleGetter(d.id)(0); })
.x1(function (d, i) { return yScaleGetter(d.id)(d.value); }) .x1(function (d) { return yScaleGetter(d.id)(d.value); })
.y(xx); .y(xx);
} else { } else {
area = d3.svg.area() area = d3.svg.area()
@ -2456,7 +2456,7 @@
.y1(function (d, i) { if (__data_groups.length > 0) { var point = getPoint(d, i); return point[1][1]; } return yScaleGetter(d.id)(d.value); }); .y1(function (d, i) { if (__data_groups.length > 0) { var point = getPoint(d, i); return point[1][1]; } return yScaleGetter(d.id)(d.value); });
} }
return function (d, i) { return function (d) {
var data = filterRemoveNull(d.values), x0, y0; var data = filterRemoveNull(d.values), x0, y0;
if (hasType([d], 'area') || hasType([d], 'area-spline')) { if (hasType([d], 'area') || hasType([d], 'area-spline')) {
@ -3798,13 +3798,17 @@
}; };
} }
*/ */
if (isNaN(this._current.endAngle)) this._current.endAngle = this._current.startAngle; if (isNaN(this._current.endAngle)) {
this._current.endAngle = this._current.startAngle;
}
interpolate = d3.interpolate(this._current, updated); interpolate = d3.interpolate(this._current, updated);
this._current = interpolate(0); this._current = interpolate(0);
return function (t) { return getArc(interpolate(t), true); }; return function (t) { return getArc(interpolate(t), true); };
}) })
.attr("transform", withTransform ? "scale(1)" : "") .attr("transform", withTransform ? "scale(1)" : "")
.style("fill", function (d) { return (__gauge_style === 'arc' && __color_values) ? levelColor(d.data.values[0].value) : color(d.data.id); }) // Where gauge reading color would receive customization.//color(d.data); }) .style("fill", function (d) {
return (__gauge_style === 'arc' && __color_values) ? levelColor(d.data.values[0].value) : color(d.data.id);
}) // Where gauge reading color would receive customization.
.style("opacity", (__color_opacity) ? __color_opacity : 1) .style("opacity", (__color_opacity) ? __color_opacity : 1)
.call(endall, function () { .call(endall, function () {
transiting = false; transiting = false;
@ -4192,7 +4196,7 @@
.style('fill', '#000') .style('fill', '#000')
.style("font-size", width / 15 + "px"); .style("font-size", width / 15 + "px");
mainPieEnter.append("text") mainPieEnter.append("text")
.attr("dx", -1*(innerRadius+((radius-innerRadius)/2)) + "px") .attr("dx", -1 * (innerRadius + ((radius - innerRadius) / 2)) + "px")
.attr("dy", "1em") .attr("dy", "1em")
.attr("class", "min") .attr("class", "min")
.style("opacity", 0) .style("opacity", 0)
@ -4201,7 +4205,7 @@
.style('fill', '#777') .style('fill', '#777')
.style("font-size", width / 20 + "px"); .style("font-size", width / 20 + "px");
mainPieEnter.append("text") mainPieEnter.append("text")
.attr("dx", innerRadius+((radius-innerRadius)/2) + "px") .attr("dx", innerRadius + ((radius - innerRadius) / 2) + "px")
.attr("dy", "1em") .attr("dy", "1em")
.attr("class", "max") .attr("class", "max")
.style("opacity", 0) .style("opacity", 0)
@ -5049,7 +5053,7 @@
} }
function generateTicks(scale) { function generateTicks(scale) {
var i, domain, ticks = []; var i, domain, ticks = [];
if (scale.ticks && tickArguments != undefined) { if (scale.ticks && tickArguments !== undefined) {
return scale.ticks.apply(scale, tickArguments); return scale.ticks.apply(scale, tickArguments);
} }
domain = scale.domain(); domain = scale.domain();

2
c3.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save