Fixed built-in auto skip caused by previous commit (#3904)

This commit is contained in:
Jerry Chang 2017-02-18 18:34:08 -08:00 committed by Evert Timberg
parent b50eac366d
commit 05e63824b3

View File

@ -521,12 +521,6 @@ module.exports = function(Chart) {
if (isHorizontal) {
skipRatio = false;
// Only calculate the skip ratio with the half width of longestRotateLabel if we got an actual rotation
// See #2584
if (isRotated) {
longestRotatedLabel /= 2;
}
if ((longestRotatedLabel + optionTicks.autoSkipPadding) * me.ticks.length > (me.width - (me.paddingLeft + me.paddingRight))) {
skipRatio = 1 + Math.floor(((longestRotatedLabel + optionTicks.autoSkipPadding) * me.ticks.length) / (me.width - (me.paddingLeft + me.paddingRight)));
}