(axis: Axis, tick: ScaleTick)
| 234 | } |
| 235 | |
| 236 | export function getAxisRawValue<TIsCategory extends boolean>(axis: Axis, tick: ScaleTick): |
| 237 | TIsCategory extends true ? string : number { |
| 238 | // In category axis with data zoom, tick is not the original |
| 239 | // index of axis.data. So tick should not be exposed to user |
| 240 | // in category axis. |
| 241 | const scale = axis.scale; |
| 242 | return (isOrdinalScale(scale) ? scale.getLabel(tick) : tick.value) as any; |
| 243 | } |
| 244 | |
| 245 | /** |
| 246 | * @param model axisLabelModel or axisTickModel |
no test coverage detected
searching dependent graphs…