* @override
(
elOption: AxisPointerElementOptions,
value: OptionDataValue,
axisModel: PolarAxisModel,
axisPointerModel: Model<CommonAxisPointerOption>,
api: ExtensionAPI
)
| 47 | * @override |
| 48 | */ |
| 49 | makeElOption( |
| 50 | elOption: AxisPointerElementOptions, |
| 51 | value: OptionDataValue, |
| 52 | axisModel: PolarAxisModel, |
| 53 | axisPointerModel: Model<CommonAxisPointerOption>, |
| 54 | api: ExtensionAPI |
| 55 | ) { |
| 56 | const axis = axisModel.axis; |
| 57 | |
| 58 | if (axis.dim === 'angle') { |
| 59 | this.animationThreshold = Math.PI / 18; |
| 60 | } |
| 61 | |
| 62 | const polar = axis.polar; |
| 63 | const thisExtent = axis.getExtent(); |
| 64 | const otherExtent = polar.getOtherAxis(axis).getExtent(); |
| 65 | |
| 66 | const coordValue = axis.dataToCoord(value); |
| 67 | |
| 68 | const axisPointerType = axisPointerModel.get('type'); |
| 69 | if (axisPointerType && axisPointerType !== 'none') { |
| 70 | const elStyle = viewHelper.buildElStyle(axisPointerModel); |
| 71 | const pointerOption = pointerShapeBuilder[axisPointerType]( |
| 72 | axis, |
| 73 | polar, |
| 74 | coordValue, |
| 75 | thisExtent, |
| 76 | otherExtent, |
| 77 | axisPointerModel.get('seriesDataIndices'), |
| 78 | axisPointerModel.ecModel |
| 79 | ); |
| 80 | pointerOption.style = elStyle; |
| 81 | elOption.graphicKey = pointerOption.type; |
| 82 | elOption.pointer = pointerOption; |
| 83 | } |
| 84 | |
| 85 | const labelMargin = axisPointerModel.get(['label', 'margin']); |
| 86 | const labelPos = getLabelPosition(value, axisModel, axisPointerModel, polar, labelMargin); |
| 87 | viewHelper.buildLabelElOption(elOption, axisModel, axisPointerModel, api, labelPos); |
| 88 | } |
| 89 | |
| 90 | // Do not support handle, util any user requires it. |
| 91 |
nothing calls this directly
no test coverage detected