* 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)
| 6 | * else from the value axis when that one is. |
| 7 | */ |
| 8 | function categoryLabel({iScale, vScale}, parsed) { |
| 9 | const scale = iScale.type === 'category' ? iScale : vScale.type === 'category' ? vScale : null; |
| 10 | const value = scale ? parsed[scale.axis] : null; |
| 11 | return isFinite(value) ? scale.getLabelForValue(value) : ''; |
| 12 | } |
| 13 | |
| 14 | export default class BubbleController extends DatasetController { |
| 15 |
no test coverage detected