* Generates all timestamps defined in the data. * Important: this method can return ticks outside the min and max range, it's the * responsibility of the calling code to clamp values if needed. * @protected
()
| 117 | * @protected |
| 118 | */ |
| 119 | _generate() { |
| 120 | const min = this.min; |
| 121 | const max = this.max; |
| 122 | let timestamps = super.getDataTimestamps(); |
| 123 | if (!timestamps.includes(min) || !timestamps.length) { |
| 124 | timestamps.splice(0, 0, min); |
| 125 | } |
| 126 | if (!timestamps.includes(max) || timestamps.length === 1) { |
| 127 | timestamps.push(max); |
| 128 | } |
| 129 | return timestamps.sort((a, b) => a - b); |
| 130 | } |
| 131 | |
| 132 | /** |
| 133 | * Returns all timestamps |
nothing calls this directly
no test coverage detected