Commit 683c9af6 authored by Masayuki Tanaka's avatar Masayuki Tanaka

Fix sub chart axis ticks

parent c4001a6e
......@@ -323,10 +323,10 @@
subYMin = __axis_rotated ? 0 : height2;
subYMax = __axis_rotated ? width2 : 1;
// update scales
x = getX(xMin, xMax, isDefined(x) ? x.domain() : undefined, function () { return xAxis.tickOffset(); });
y = getY(yMin, yMax, isDefined(y) ? y.domain() : undefined);
y2 = getY(yMin, yMax, isDefined(y2) ? y2.domain() : undefined);
subX = getX(xMin, xMax, isDefined(orgXDomain) ? orgXDomain : undefined, function (d) { return d % 1 === 0 ? subXAxis.tickOffset() : 0; });
x = getX(xMin, xMax, x ? x.domain() : undefined, function () { return xAxis.tickOffset(); });
y = getY(yMin, yMax, y ? y.domain() : undefined);
y2 = getY(yMin, yMax, y2 ? y2.domain() : undefined);
subX = getX(xMin, xMax, orgXDomain, function (d) { return d % 1 ? 0 : subXAxis.tickOffset(); });
subY = getY(subYMin, subYMax);
subY2 = getY(subYMin, subYMax);
// update axes
......@@ -1491,6 +1491,7 @@
// Set axes attrs
xAxis.ticks(data.length < 10 ? data.length : 10);
subXAxis.ticks(data.length < 10 ? data.length : 10);
yAxis.ticks(__axis_y_ticks).outerTickSize(0);
yAxis2.ticks(__axis_y2_ticks).outerTickSize(0);
......
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