You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
centroidX and centroidY are calculated before and enable to get the coordinates of the point in the middle of the "pie" (mid-radius and mid-angle). So, with a pie of size PI and radius=1 on the pie chart, centroid would be located at radius=0.5, and an angle of Pi/2.
So, this works, except that an offset is introduced, for some reason, in the annotation component. The value that the component is offset with is the value in the transform translate in the ConnectorEndDot component. Same value on x and on y.
If I add these x and y offset values to the translate values of the Annotation component in the html code, then things will display as expected, with the connector dot located at centroid.
There does not seem to be any parameter to fix this in the API doc.
Any idea where that offset comes from ? How can I fix that ?
The text was updated successfully, but these errors were encountered:
I'm trying to use react-annotation on a pie chart.
centroidX
andcentroidY
are calculated before and enable to get the coordinates of the point in the middle of the "pie" (mid-radius and mid-angle). So, with a pie of size PI and radius=1 on the pie chart, centroid would be located at radius=0.5, and an angle of Pi/2.So, this works, except that an offset is introduced, for some reason, in the annotation component. The value that the component is offset with is the value in the transform translate in the
ConnectorEndDot
component. Same value on x and on y.If I add these x and y offset values to the translate values of the
Annotation
component in the html code, then things will display as expected, with the connector dot located at centroid.There does not seem to be any parameter to fix this in the API doc.
Any idea where that offset comes from ? How can I fix that ?
The text was updated successfully, but these errors were encountered: