Browse Source

Fix error about event rect widt when no ticks

pull/1053/head
Masayuki Tanaka 10 years ago
parent
commit
a3aecb0bbb
  1. 2
      c3.js
  2. 6
      c3.min.js
  3. 2
      src/c3.axis.js

2
c3.js

@ -6918,7 +6918,7 @@
length = axis.g.select('path.domain').node().getTotalLength() - outerTickSize * 2;
interval = length / axis.g.selectAll('line').size();
}
return interval;
return interval === Infinity ? 0 : interval;
};
axis.ticks = function () {
if (!arguments.length) { return tickArguments; }

6
c3.min.js vendored

File diff suppressed because one or more lines are too long

2
src/c3.axis.js

@ -270,7 +270,7 @@ function c3_axis(d3, params) {
length = axis.g.select('path.domain').node().getTotalLength() - outerTickSize * 2;
interval = length / axis.g.selectAll('line').size();
}
return interval;
return interval === Infinity ? 0 : interval;
};
axis.ticks = function () {
if (!arguments.length) { return tickArguments; }

Loading…
Cancel
Save