|
Last change
on this file since a762898 was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
571 bytes
|
| Line | |
|---|
| 1 | import { polarToCartesian } from '../PolarUtils';
|
|---|
| 2 | /**
|
|---|
| 3 | * Only applicable for radial layouts
|
|---|
| 4 | * @param {Object} activeCoordinate ChartCoordinate
|
|---|
| 5 | * @returns {Object} RadialCursorPoints
|
|---|
| 6 | */
|
|---|
| 7 | export 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.