Skip to content
On this page

PolarInterpolator

PolarInterpolator can be used either as a composable or a renderless component. It is responsible for for coming up with the mapping of x/y data values into screen coordinates where the origin is a pole.

Props

nametypedefaultrequireddescription
angleDomainDomainN/A🗹the domain of values to spread over the angles of this plot
magnitudeDomainDomainN/A🗹the domain of values to spread over the magnitude of this plot (center to edge)
endDistanceRationumber1how far this interpolator should go down the available radius, 1 means end of radius
perimeterRationumber1how much of the circle's perimeter to use. 1 means all of it
startDistanceRationumber0where this interpolator should begin on the radius, 0 means at the origin, 1 means at the end of the radius

Slots

default

proptypecomment
centerPointcenter of the pole in screen space
radiusMinnumbernotes
radiusMaxnumbernotes
perimeternumberlength of perimeter in pixels
perimeterRationumber1 = full circle, .25 = quarter circle
angleScalerLinearScalerscaler interface for turning screen coords into angles on the plot
magnitudeScalerLinearScalerscaler interface for turning screen coords into magnitude on the plot
cartesianScalerCartesianScalerscaler that scales data-space points into {x:angle, y:magnitude}

Released under the MIT License.