* The label of the point's own category: from the index axis when it is a category axis, * else from the value axis when that one is.
({iScale, vScale}, parsed)
| 8 | * else from the value axis when that one is. |
| 9 | */ |
| 10 | function categoryLabel({iScale, vScale}, parsed) { |
| 11 | const scale = iScale.type === 'category' ? iScale : vScale.type === 'category' ? vScale : null; |
| 12 | const value = scale ? parsed[scale.axis] : null; |
| 13 | return isFinite(value) ? scale.getLabelForValue(value) : ''; |
| 14 | } |
| 15 | |
| 16 | export default class ScatterController extends DatasetController { |
| 17 |
no test coverage detected