| 161 | } |
| 162 | |
| 163 | function parseTickLabelCustomValues( |
| 164 | customValues: AxisTickLabelCustomValuesOption, |
| 165 | scale: Scale, |
| 166 | ): ScaleTick[] { |
| 167 | const extent = scale.getExtent(); |
| 168 | const tickNumbers: number[] = []; |
| 169 | zrUtil.each(customValues, function (val) { |
| 170 | val = scale.parse(val); |
| 171 | if (val >= extent[0] && val <= extent[1]) { |
| 172 | tickNumbers.push(val); |
| 173 | } |
| 174 | }); |
| 175 | removeDuplicates(tickNumbers, removeDuplicatesGetKeyFromItemItself, null); |
| 176 | asc(tickNumbers); |
| 177 | return zrUtil.map(tickNumbers, function (tickVal) { |
| 178 | return {value: tickVal}; |
| 179 | }); |
| 180 | } |
| 181 | |
| 182 | function makeCategoryLabels(axis: Axis, ctx: AxisLabelsComputingContext): ReturnType<typeof createAxisLabels> { |
| 183 | const labelModel = axis.getLabelModel(); |