* @return Never be null/undefined. `number` will be converted to string. Because: * In most cases, name is used in display, where returning a string is more convenient. * In other cases, name is used in query (see `indexOfName`), where we can keep the * rule that name `2` equals to na
(idx: number)
| 729 | * rule that name `2` equals to name `'2'`. |
| 730 | */ |
| 731 | getName(idx: number): string { |
| 732 | const rawIndex = this.getRawIndex(idx); |
| 733 | let name = this._nameList[rawIndex]; |
| 734 | if (name == null && this._nameDimIdx != null) { |
| 735 | name = getIdNameFromStore(this, this._nameDimIdx, rawIndex); |
| 736 | } |
| 737 | if (name == null) { |
| 738 | name = ''; |
| 739 | } |
| 740 | return name; |
| 741 | } |
| 742 | |
| 743 | private _getCategory(dimIdx: number, idx: number): OrdinalRawValue { |
| 744 | const ordinal = this._store.get(dimIdx, idx); |