Browse Source

Fix padding when rotated

pull/615/head
Masayuki Tanaka 10 years ago
parent
commit
8b51279b1b
  1. 2
      c3.js
  2. 2
      c3.min.js
  3. 2
      src/axis.js

2
c3.js

@ -4067,7 +4067,7 @@
$$.d3.select('body').append("g").style('visibility', 'hidden').call(axis).each(function () { $$.d3.select('body').append("g").style('visibility', 'hidden').call(axis).each(function () {
$$.d3.select(this).selectAll('text').each(function () { $$.d3.select(this).selectAll('text').each(function () {
var box = this.getBoundingClientRect(); var box = this.getBoundingClientRect();
if (maxWidth < box.width) { maxWidth = box.width; } if (box.left > 0 && maxWidth < box.width) { maxWidth = box.width; }
}); });
}).remove(); }).remove();
} }

2
c3.min.js vendored

File diff suppressed because one or more lines are too long

2
src/axis.js

@ -270,7 +270,7 @@ c3_chart_internal_fn.getMaxTickWidth = function (id) {
$$.d3.select('body').append("g").style('visibility', 'hidden').call(axis).each(function () { $$.d3.select('body').append("g").style('visibility', 'hidden').call(axis).each(function () {
$$.d3.select(this).selectAll('text').each(function () { $$.d3.select(this).selectAll('text').each(function () {
var box = this.getBoundingClientRect(); var box = this.getBoundingClientRect();
if (maxWidth < box.width) { maxWidth = box.width; } if (box.left > 0 && maxWidth < box.width) { maxWidth = box.width; }
}); });
}).remove(); }).remove();
} }

Loading…
Cancel
Save