first commit
This commit is contained in:
23
node_modules/recharts/es6/util/cursor/getRadialCursorPoints.js
generated
vendored
Normal file
23
node_modules/recharts/es6/util/cursor/getRadialCursorPoints.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
import { polarToCartesian } from '../PolarUtils';
|
||||
/**
|
||||
* Only applicable for radial layouts
|
||||
* @param {Object} activeCoordinate ChartCoordinate
|
||||
* @returns {Object} RadialCursorPoints
|
||||
*/
|
||||
export function getRadialCursorPoints(activeCoordinate) {
|
||||
var cx = activeCoordinate.cx,
|
||||
cy = activeCoordinate.cy,
|
||||
radius = activeCoordinate.radius,
|
||||
startAngle = activeCoordinate.startAngle,
|
||||
endAngle = activeCoordinate.endAngle;
|
||||
var startPoint = polarToCartesian(cx, cy, radius, startAngle);
|
||||
var endPoint = polarToCartesian(cx, cy, radius, endAngle);
|
||||
return {
|
||||
points: [startPoint, endPoint],
|
||||
cx: cx,
|
||||
cy: cy,
|
||||
radius: radius,
|
||||
startAngle: startAngle,
|
||||
endAngle: endAngle
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user