Commit 229be613 authored by Masayuki Tanaka's avatar Masayuki Tanaka

Fix event rect when width < 1

parent f62f2820
......@@ -587,7 +587,7 @@
}
function getEventRectWidth() {
var target = getMaxDataCountTarget(c3.data.targets),
firstData, lastData, base, maxDataCount, ratio;
firstData, lastData, base, maxDataCount, ratio, w;
if (!target) {
return 0;
}
......@@ -598,7 +598,8 @@
}
maxDataCount = getMaxDataCount();
ratio = (hasBarType(c3.data.targets) ? (maxDataCount - (isCategorized ? 0.25 : 1)) / maxDataCount : 1);
return maxDataCount > 1 ? (base * ratio) / (maxDataCount - 1) : base;
w = maxDataCount > 1 ? (base * ratio) / (maxDataCount - 1) : base;
return w < 1 ? 1 : w;
}
function updateLegendStep(step) {
legendStep = step;
......
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