source: node_modules/recharts/es6/util/cursor/getRadialCursorPoints.js

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 6 months ago

Added visualizations

  • Property mode set to 100644
File size: 571 bytes
RevLine 
[a762898]1import { polarToCartesian } from '../PolarUtils';
2/**
3 * Only applicable for radial layouts
4 * @param {Object} activeCoordinate ChartCoordinate
5 * @returns {Object} RadialCursorPoints
6 */
7export function getRadialCursorPoints(activeCoordinate) {
8 var {
9 cx,
10 cy,
11 radius,
12 startAngle,
13 endAngle
14 } = activeCoordinate;
15 var startPoint = polarToCartesian(cx, cy, radius, startAngle);
16 var endPoint = polarToCartesian(cx, cy, radius, endAngle);
17 return {
18 points: [startPoint, endPoint],
19 cx,
20 cy,
21 radius,
22 startAngle,
23 endAngle
24 };
25}
Note: See TracBrowser for help on using the repository browser.