* @protected
()
| 154 | * @protected |
| 155 | */ |
| 156 | getMaxOverflow() { |
| 157 | const meta = this._cachedMeta; |
| 158 | const data = meta.data || []; |
| 159 | |
| 160 | if (!this.options.showLine) { |
| 161 | let max = 0; |
| 162 | for (let i = data.length - 1; i >= 0; --i) { |
| 163 | max = Math.max(max, data[i].size(this.resolveDataElementOptions(i)) / 2); |
| 164 | } |
| 165 | return max > 0 && max; |
| 166 | } |
| 167 | |
| 168 | const dataset = meta.dataset; |
| 169 | const border = dataset.options && dataset.options.borderWidth || 0; |
| 170 | |
| 171 | if (!data.length) { |
| 172 | return border; |
| 173 | } |
| 174 | |
| 175 | const firstPoint = data[0].size(this.resolveDataElementOptions(0)); |
| 176 | const lastPoint = data[data.length - 1].size(this.resolveDataElementOptions(data.length - 1)); |
| 177 | return Math.max(border, firstPoint, lastPoint) / 2; |
| 178 | } |
| 179 | } |
nothing calls this directly
no test coverage detected