* Returns the maximum number of ticks based on the scale dimension * @protected
()
| 32 | * @protected |
| 33 | */ |
| 34 | computeTickLimit() { |
| 35 | const horizontal = this.isHorizontal(); |
| 36 | const length = horizontal ? this.width : this.height; |
| 37 | const minRotation = toRadians(this.options.ticks.minRotation); |
| 38 | const ratio = (horizontal ? Math.sin(minRotation) : Math.cos(minRotation)) || 0.001; |
| 39 | const tickFont = this._resolveTickFontOptions(0); |
| 40 | return Math.ceil(length / Math.min(40, tickFont.lineHeight / ratio)); |
| 41 | } |
| 42 | |
| 43 | // Utils |
| 44 | getPixelForValue(value) { |
nothing calls this directly
no test coverage detected