// label settings
ticks: {
beginAtZero: false,
+ minRotation: 0,
maxRotation: 50,
mirror: false,
padding: 10,
var lastWidth = this.ctx.measureText(this.ticks[this.ticks.length - 1]).width;
var firstRotated;
- this.labelRotation = 0;
+ this.labelRotation = this.options.ticks.minRotation || 0;
this.paddingRight = 0;
this.paddingLeft = 0;
},
ticks: {
beginAtZero: false,
+ minRotation: 0,
maxRotation: 50,
mirror: false,
padding: 10,
}
}
});
-
+
var xScale = chartInstance.scales.xScale0;
expect(xScale.getPixelForValue(1, 0, 0)).toBeCloseToPixel(501); // right - paddingRight
expect(xScale.getPixelForValue(-1, 0, 0)).toBeCloseToPixel(41); // left + paddingLeft