* Returns the location of the tick at the given index * The coordinate (0, 0) is at the upper-left corner of the canvas * @param {number} index * @return {number}
(index)
| 904 | * @return {number} |
| 905 | */ |
| 906 | getPixelForTick(index) { |
| 907 | const ticks = this.ticks; |
| 908 | if (index < 0 || index > ticks.length - 1) { |
| 909 | return null; |
| 910 | } |
| 911 | return this.getPixelForValue(ticks[index].value); |
| 912 | } |
| 913 | |
| 914 | /** |
| 915 | * Utility for getting the pixel location of a percentage of scale |
no test coverage detected