* Formatter for logarithmic ticks * @method Chart.Ticks.formatters.logarithmic * @param tickValue {number} the value to be formatted * @param index {number} the position of the tickValue parameter in the ticks array * @param ticks {object[]} the list of ticks being converted * @return
(tickValue, index, ticks)
| 92 | * @return {string} string representation of the tickValue parameter |
| 93 | */ |
| 94 | logarithmic(tickValue, index, ticks) { |
| 95 | if (tickValue === 0) { |
| 96 | return '0'; |
| 97 | } |
| 98 | const remain = ticks[index].significand || (tickValue / (Math.pow(10, Math.floor(log10(tickValue))))); |
| 99 | if ([1, 2, 3, 5, 10, 15].includes(remain) || index > 0.8 * ticks.length) { |
| 100 | return formatters.numeric.call(this, tickValue, index, ticks); |
| 101 | } |
| 102 | return ''; |
| 103 | } |
| 104 | |
| 105 | }; |
| 106 |
nothing calls this directly
no outgoing calls
no test coverage detected