(chartX: number, chartY: number, useFinalPosition: boolean)
| 351 | } |
| 352 | |
| 353 | inRange(chartX: number, chartY: number, useFinalPosition: boolean) { |
| 354 | const point = this.getProps(['x', 'y'], useFinalPosition); |
| 355 | const {angle, distance} = getAngleFromPoint(point, {x: chartX, y: chartY}); |
| 356 | const {startAngle, endAngle, innerRadius, outerRadius, circumference} = this.getProps([ |
| 357 | 'startAngle', |
| 358 | 'endAngle', |
| 359 | 'innerRadius', |
| 360 | 'outerRadius', |
| 361 | 'circumference' |
| 362 | ], useFinalPosition); |
| 363 | const rAdjust = (this.options.spacing + this.options.borderWidth) / 2; |
| 364 | const _circumference = valueOrDefault(circumference, endAngle - startAngle); |
| 365 | const nonZeroBetween = _angleBetween(angle, startAngle, endAngle) && startAngle !== endAngle; |
| 366 | const betweenAngles = _circumference >= TAU || nonZeroBetween; |
| 367 | const withinRadius = _isBetween(distance, innerRadius + rAdjust, outerRadius + rAdjust); |
| 368 | |
| 369 | return (betweenAngles && withinRadius); |
| 370 | } |
| 371 | |
| 372 | getCenterPoint(useFinalPosition: boolean) { |
| 373 | const {x, y, startAngle, endAngle, innerRadius, outerRadius} = this.getProps([ |
nothing calls this directly
no test coverage detected