Browse Source

Fix label overwrap on left axis - #961

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

2
c3.js

@ -4373,7 +4373,7 @@
svg.append('g').call(axis).each(function () {
$$.d3.select(this).selectAll('text tspan').each(function () {
var box = this.getBoundingClientRect();
if (box.left >= 0 && maxWidth < box.width) { maxWidth = box.width; }
if (maxWidth < box.width) { maxWidth = box.width; }
});
});
// TODO: time lag to get maxWidth

2
c3.min.js vendored

File diff suppressed because one or more lines are too long

2
src/axis.js

@ -294,7 +294,7 @@ c3_chart_internal_fn.getMaxTickWidth = function (id, withoutRecompute) {
svg.append('g').call(axis).each(function () {
$$.d3.select(this).selectAll('text tspan').each(function () {
var box = this.getBoundingClientRect();
if (box.left >= 0 && maxWidth < box.width) { maxWidth = box.width; }
if (maxWidth < box.width) { maxWidth = box.width; }
});
});
// TODO: time lag to get maxWidth

Loading…
Cancel
Save