Browse Source

Fix tick overflow

pull/232/merge
Masayuki Tanaka 11 years ago
parent
commit
1bdc159f69
  1. 7
      c3.js
  2. 6
      c3.min.js

7
c3.js

@ -4617,13 +4617,18 @@
tickOffset = tickX = 0;
}
function tickSize(d) {
var tickPosition = scale(d) + tickOffset;
return range[0] < tickPosition && tickPosition < range[1] ? innerTickSize : 0;
}
switch (orient) {
case "bottom":
{
tickTransform = axisX;
lineEnter.attr("y2", innerTickSize);
textEnter.attr("y", Math.max(innerTickSize, 0) + tickPadding);
lineUpdate.attr("x1", tickX).attr("x2", tickX).attr("y2", innerTickSize);
lineUpdate.attr("x1", tickX).attr("x2", tickX).attr("y2", tickSize);
textUpdate.attr("x", 0).attr("y", Math.max(innerTickSize, 0) + tickPadding);
text.attr("dy", ".71em").style("text-anchor", "middle");
pathUpdate.attr("d", "M" + range[0] + "," + outerTickSize + "V0H" + range[1] + "V" + outerTickSize);

6
c3.min.js vendored

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