Commit 9f50463a authored by Masayuki Tanaka's avatar Masayuki Tanaka

Fix event rect

parent 715b1f9e
......@@ -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;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment