Browse Source

Fix event rect

pull/104/head
Masayuki Tanaka 11 years ago
parent
commit
9f50463a34
  1. 4
      c3.js
  2. 4
      c3.min.js

4
c3.js

@ -475,7 +475,7 @@
function getEventRectWidth() {
var base = __axis_rotated ? height : width,
maxDataCount = getMaxDataCount(),
ratio = getXDomainRatio() * (hasBarType(c3.data.targets) ? (maxDataCount - 1) / maxDataCount : 0.98);
ratio = getXDomainRatio() * (hasBarType(c3.data.targets) ? (maxDataCount - (isCategorized ? 0.25 : 1)) / maxDataCount : 0.98);
return maxDataCount > 1 ? (base * ratio) / (maxDataCount - 1) : base;
}
function updateLegndStep(step) {
@ -3014,7 +3014,7 @@
.attr('height', height);
// exit : not needed becuase always only one rect exists
} else {
if (isCustomX) {
if (isCustomX && !isCategorized) {
rectW = function (d, i) {
var prevX = getPrevX(i), nextX = getNextX(i);
return (x(nextX ? nextX : d.x + 50) - x(prevX ? prevX : d.x - 50)) / 2;

4
c3.min.js vendored

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