Commit 93348c05 authored by Masayuki Tanaka's avatar Masayuki Tanaka

Fix resize and zoom when categorized axis

parent afefe29a
......@@ -214,26 +214,6 @@
yAxis.scale(y).orient(__axis_rotated ? (__axis_y_inner ? "top" : "bottom") : (__axis_y_inner ? "right" : "left"));
yAxis2.scale(y2).orient(__axis_rotated ? (__axis_y2_inner ? "bottom" : "top") : (__axis_y2_inner ? "left" : "right"));
subXAxis.scale(subX).orient("bottom");
};
updateScales();
if (isTimeSeries) {
xAxis.tickFormat(customTimeFormat);
}
if (isCategorized) {
xAxis.categories(__axis_x_categories).tickCentered(__axis_x_tick_centered);
subXAxis.categories(__axis_x_categories).tickCentered(__axis_x_tick_centered);
} else {
// TODO: fix
xAxis.tickOffset = function () {
return 0;
};
// TODO: fix
subXAxis.tickOffset = function () {
return 0;
};
}
// Use custom scale if needed
if (isCategorized) {
// TODO: fix this
......@@ -259,6 +239,26 @@
};
})();
}
};
updateScales();
// Set up axies
if (isTimeSeries) {
xAxis.tickFormat(customTimeFormat);
}
if (isCategorized) {
xAxis.categories(__axis_x_categories).tickCentered(__axis_x_tick_centered);
subXAxis.categories(__axis_x_categories).tickCentered(__axis_x_tick_centered);
} else {
// TODO: fix
xAxis.tickOffset = function () {
return 0;
};
// TODO: fix
subXAxis.tickOffset = function () {
return 0;
};
}
// For main region
var lineOnMain = (function () {
......
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