```javascript
{
- // Transform the ticks array of the scale instance into strings. The default implementation simply calls this.options.ticks.callback(numericalTick, index, ticks);
- convertTicksToLabels: function() {},
+ // Adds labels to objects in the ticks array. The default implementation simply calls this.options.ticks.callback(numericalTick, index, ticks);
+ generateTickLabels: function() {},
// Determine how much the labels will rotate by. The default implementation will only rotate labels if the scale is horizontal.
- calculateTickRotation: function() {},
+ calculateLabelRotation: function() {},
// Fits the scale into the canvas.
// this.maxWidth and this.maxHeight will tell you the maximum dimensions the scale instance can be. Scales should endeavour to be as efficient as possible with canvas space.
* `Chart.Animation.animationObject` was renamed to `Chart.Animation`
* `Chart.Animation.chartInstance` was renamed to `Chart.Animation.chart`
* `DatasetController.updateElement` was renamed to `DatasetController.updateElements`
+* `Scale.calculateTickRotation` was renamed to `Scale.calculateLabelRotation`
* `TimeScale.getLabelCapacity` was renamed to `TimeScale._getLabelCapacity`
* `TimeScale.tickFormatFunction` was renamed to `TimeScale._tickFormatFunction`
* `TimeScale.getPixelForOffset` was renamed to `TimeScale._getPixelForOffset`
// _configure is called twice, once here, once from core.controller.updateLayout.
// Here we haven't been positioned yet, but dimensions are correct.
- // Variables set in _configure are needed for calculateTickRotation, and
+ // Variables set in _configure are needed for calculateLabelRotation, and
// it's ok that coordinates are not correct there, only dimensions matter.
me._configure();
// Tick Rotation
- me.beforeCalculateTickRotation();
- me.calculateTickRotation();
- me.afterCalculateTickRotation();
+ me.beforeCalculateLabelRotation();
+ me.calculateLabelRotation(); // Preconditions: number of ticks and sizes of largest labels must be calculated beforehand
+ me.afterCalculateLabelRotation();
me.beforeFit();
- me.fit();
+ me.fit(); // Preconditions: label rotation and label sizes must be calculated beforehand
me.afterFit();
// Auto-skip
//
- beforeCalculateTickRotation() {
- helpers.callback(this.options.beforeCalculateTickRotation, [this]);
+ beforeCalculateLabelRotation() {
+ helpers.callback(this.options.beforeCalculateLabelRotation, [this]);
}
- calculateTickRotation() {
+ calculateLabelRotation() {
var me = this;
var options = me.options;
var tickOpts = options.ticks;
me.labelRotation = labelRotation;
}
- afterCalculateTickRotation() {
- helpers.callback(this.options.afterCalculateTickRotation, [this]);
+ afterCalculateLabelRotation() {
+ helpers.callback(this.options.afterCalculateLabelRotation, [this]);
}
//