UNPKG

@nivo/polar-axes

Version:
1 lines 26.6 kB
{"version":3,"file":"nivo-polar-axes.mjs","sources":["../src/CircularAxisTick.tsx","../src/CircularAxis.tsx","../src/RadialGrid.tsx","../src/CircularGrid.tsx","../src/PolarGrid.tsx","../src/RadialAxisTick.tsx","../src/RadialAxis.tsx"],"sourcesContent":["import { animated } from '@react-spring/web'\nimport { Text } from '@nivo/text'\nimport { CircularAxisTickProps } from './types'\n\nexport const CircularAxisTick = ({\n label,\n theme,\n animated: animatedProps,\n}: CircularAxisTickProps) => {\n return (\n <animated.g opacity={animatedProps.opacity}>\n <animated.line\n x1={animatedProps.x1}\n y1={animatedProps.y1}\n x2={animatedProps.x2}\n y2={animatedProps.y2}\n style={theme.ticks.line}\n />\n <Text\n dx={animatedProps.textX}\n dy={animatedProps.textY}\n dominantBaseline=\"central\"\n style={theme.ticks.text}\n textAnchor=\"middle\"\n >\n {label}\n </Text>\n </animated.g>\n )\n}\n","import { createElement, SVGProps, useMemo } from 'react'\nimport { useSpring, useTransition } from '@react-spring/web'\nimport { useMotionConfig, positionFromAngle, degreesToRadians } from '@nivo/core'\nimport { useExtendedAxisTheme, useTheme } from '@nivo/theming'\nimport { AnyScale, getScaleTicks, centerScale } from '@nivo/scales'\nimport { ArcLine } from '@nivo/arcs'\nimport { CircularAxisConfig, CircularAxisTickAnimatedProps } from './types'\nimport { CircularAxisTick } from './CircularAxisTick'\n\ntype CircularAxisProps = {\n type: 'inner' | 'outer'\n center?: [number, number]\n radius: number\n startAngle: number\n endAngle: number\n scale: AnyScale\n} & CircularAxisConfig\n\nconst getLinePositions = (angle: number, innerRadius: number, outerRadius: number) => {\n const start = positionFromAngle(degreesToRadians(angle), innerRadius)\n const end = positionFromAngle(degreesToRadians(angle), outerRadius)\n\n return {\n x1: start.x,\n y1: start.y,\n x2: end.x,\n y2: end.y,\n }\n}\n\nconst getTextPosition = (angle: number, radius: number) => {\n const position = positionFromAngle(degreesToRadians(angle), radius)\n\n return {\n textX: position.x,\n textY: position.y,\n }\n}\n\nexport const CircularAxis = ({\n type,\n center = [0, 0],\n radius,\n startAngle: originalStartAngle,\n endAngle: originalEndAngle,\n scale,\n tickSize = 5,\n tickPadding = 12,\n tickComponent = CircularAxisTick,\n style,\n}: CircularAxisProps) => {\n const startAngle = originalStartAngle - 90\n const endAngle = originalEndAngle - 90\n\n const { animate, config: springConfig } = useMotionConfig()\n const spring = useSpring<{\n radius: number\n startAngle: number\n endAngle: number\n opacity: number\n }>({\n radius,\n startAngle,\n endAngle,\n opacity: 1,\n immediate: !animate,\n config: springConfig,\n })\n\n const ticks = useMemo(() => {\n const values = getScaleTicks(scale)\n const angle = 'bandwidth' in scale ? centerScale(scale) : scale\n\n return values.map((value, index) => ({\n key: index,\n label: value,\n angle: angle(value) - 90,\n }))\n }, [scale])\n\n const outerRadius = type === 'inner' ? radius - tickSize : radius + tickSize\n const textRadius = type === 'inner' ? outerRadius - tickPadding : outerRadius + tickPadding\n\n const transition = useTransition<(typeof ticks)[0], CircularAxisTickAnimatedProps>(ticks, {\n keys: tick => tick.key,\n initial: tick => ({\n ...getLinePositions(tick.angle, radius, outerRadius),\n ...getTextPosition(tick.angle, textRadius),\n opacity: 1,\n }),\n from: tick => ({\n ...getLinePositions(tick.angle, radius, outerRadius),\n ...getTextPosition(tick.angle, textRadius),\n opacity: 0,\n }),\n enter: tick => ({\n ...getLinePositions(tick.angle, radius, outerRadius),\n ...getTextPosition(tick.angle, textRadius),\n opacity: 1,\n }),\n update: tick => ({\n ...getLinePositions(tick.angle, radius, outerRadius),\n ...getTextPosition(tick.angle, textRadius),\n opacity: 1,\n }),\n leave: tick => ({\n ...getLinePositions(tick.angle, radius, outerRadius),\n ...getTextPosition(tick.angle, textRadius),\n opacity: 0,\n }),\n immediate: !animate,\n config: springConfig,\n })\n\n const theme = useTheme()\n const axisTheme = useExtendedAxisTheme(theme.axis, style)\n\n return (\n <g transform={`translate(${center[0]}, ${center[1]})`} style={{ pointerEvents: 'none' }}>\n <ArcLine\n animated={spring}\n {...(axisTheme.domain.line as Omit<SVGProps<SVGPathElement>, 'ref'>)}\n fill=\"none\"\n />\n {transition((animatedProps, tick) =>\n createElement(tickComponent, {\n key: tick.key,\n label: tick.label,\n theme: axisTheme,\n animated: animatedProps,\n })\n )}\n </g>\n )\n}\n","import { SVGProps, useMemo } from 'react'\nimport { useTransition, animated } from '@react-spring/web'\nimport { useMotionConfig } from '@nivo/core'\nimport { useTheme } from '@nivo/theming'\nimport { AnyScale, getScaleTicks } from '@nivo/scales'\n\nexport interface RadialGridProps {\n scale: AnyScale\n ticks?: number | number[]\n innerRadius: number\n outerRadius: number\n}\n\nexport const RadialGrid = ({ scale, innerRadius, outerRadius }: RadialGridProps) => {\n const theme = useTheme()\n\n const angles = useMemo(() => {\n const values = getScaleTicks(scale)\n\n return values.map((angleValue, index) => ({\n id: index,\n angle: scale(angleValue) - 90,\n }))\n }, [scale])\n\n const { animate, config: springConfig } = useMotionConfig()\n const transition = useTransition<\n { id: number; angle: number },\n { angle: number; opacity: number }\n >(angles, {\n keys: item => item.id,\n initial: item => ({\n angle: item.angle,\n opacity: 1,\n }),\n from: item => ({\n angle: item.angle,\n opacity: 0,\n }),\n enter: item => ({\n angle: item.angle,\n opacity: 1,\n }),\n update: item => ({\n angle: item.angle,\n opacity: 1,\n }),\n leave: item => ({\n angle: item.angle,\n opacity: 0,\n }),\n config: springConfig,\n immediate: !animate,\n })\n\n return (\n <>\n {transition((style, angle) => (\n <animated.g\n key={angle.id}\n transform={style.angle.to(v => `rotate(${v})`)}\n opacity={style.opacity}\n >\n <line\n x1={innerRadius}\n x2={outerRadius}\n {...(theme.grid.line as SVGProps<SVGLineElement>)}\n />\n </animated.g>\n ))}\n </>\n )\n}\n","import { SVGProps, useMemo } from 'react'\nimport { useTransition } from '@react-spring/web'\nimport { useMotionConfig } from '@nivo/core'\nimport { useTheme } from '@nivo/theming'\nimport { AnyScale, TicksSpec, getScaleTicks } from '@nivo/scales'\nimport { ArcLine } from '@nivo/arcs'\n\n/**\n * Angles are expressed in degrees.\n */\nexport interface CircularGridProps {\n scale: AnyScale\n ticks?: TicksSpec<any>\n startAngle: number\n endAngle: number\n}\n\nexport const CircularGrid = ({\n scale,\n ticks,\n startAngle: originalStartAngle,\n endAngle: originalEndAngle,\n}: CircularGridProps) => {\n const theme = useTheme()\n\n const startAngle = originalStartAngle - 90\n const endAngle = originalEndAngle - 90\n\n const radii = useMemo(() => {\n const values = getScaleTicks(scale, ticks)\n\n return values.map((value, index) => {\n let radius = scale(value) as number\n if ('bandwidth' in scale) {\n radius += scale.bandwidth() / 2\n }\n\n return {\n id: index,\n radius,\n }\n })\n }, [scale, ticks])\n\n const { animate, config: springConfig } = useMotionConfig()\n const transition = useTransition<\n { id: number; radius: number },\n { radius: number; startAngle: number; endAngle: number; opacity: number }\n >(radii, {\n keys: item => item.id,\n initial: item => ({\n radius: item.radius,\n startAngle,\n endAngle,\n opacity: 1,\n }),\n from: item => ({\n radius: item.radius,\n startAngle,\n endAngle,\n opacity: 0,\n }),\n enter: item => ({\n radius: item.radius,\n startAngle,\n endAngle,\n opacity: 1,\n }),\n update: item => ({\n radius: item.radius,\n startAngle,\n endAngle,\n opacity: 1,\n }),\n leave: item => ({\n radius: item.radius,\n startAngle,\n endAngle,\n opacity: 0,\n }),\n config: springConfig,\n immediate: !animate,\n })\n\n return (\n <>\n {transition((style, item) => (\n <ArcLine\n key={item.id}\n animated={style}\n {...(theme.grid.line as Omit<SVGProps<SVGPathElement>, 'ref'>)}\n strokeOpacity={style.opacity}\n fill=\"none\"\n />\n ))}\n </>\n )\n}\n","import { AnyScale } from '@nivo/scales'\nimport { RadialGrid } from './RadialGrid'\nimport { CircularGrid, CircularGridProps } from './CircularGrid'\n\nexport interface PolarGridProps {\n center: [number, number]\n enableRadialGrid: boolean\n angleScale: AnyScale\n startAngle: number\n endAngle: number\n enableCircularGrid: boolean\n radiusScale: AnyScale\n circularGridTicks?: CircularGridProps['ticks']\n}\n\nexport const PolarGrid = ({\n center,\n enableRadialGrid,\n angleScale,\n startAngle,\n endAngle,\n enableCircularGrid,\n radiusScale,\n circularGridTicks,\n}: PolarGridProps) => {\n const innerRadius = Math.min(...radiusScale.range())\n const outerRadius = Math.max(...radiusScale.range())\n\n return (\n <g transform={`translate(${center[0]},${center[1]})`}>\n {enableRadialGrid && (\n <RadialGrid\n scale={angleScale}\n innerRadius={innerRadius}\n outerRadius={outerRadius}\n />\n )}\n {enableCircularGrid && (\n <CircularGrid\n scale={radiusScale}\n ticks={circularGridTicks}\n startAngle={startAngle}\n endAngle={endAngle}\n />\n )}\n </g>\n )\n}\n","import { animated, to } from '@react-spring/web'\nimport { Text } from '@nivo/text'\nimport { RadialAxisTickProps } from './types'\n\nexport const RadialAxisTick = ({\n label,\n textAnchor,\n theme,\n animated: animatedProps,\n}: RadialAxisTickProps) => {\n return (\n <animated.g\n opacity={animatedProps.opacity}\n transform={to(\n [animatedProps.y, animatedProps.rotation],\n (y, rotation) => `translate(${y}, 0) rotate(${rotation})`\n )}\n >\n <animated.line x2={animatedProps.length} style={theme.ticks.line} />\n <Text\n dx={animatedProps.textX}\n textAnchor={textAnchor}\n dominantBaseline=\"central\"\n style={theme.ticks.text}\n >\n {label}\n </Text>\n </animated.g>\n )\n}\n","import { createElement, useMemo } from 'react'\nimport { useSpring, useTransition, animated } from '@react-spring/web'\nimport { useMotionConfig, normalizeAngleDegrees } from '@nivo/core'\nimport { AnyScale, getScaleTicks } from '@nivo/scales'\nimport { useExtendedAxisTheme, useTheme } from '@nivo/theming'\nimport { RadialAxisConfig, RadialAxisTickAnimatedProps } from './types'\nimport { RadialAxisTick } from './RadialAxisTick'\n\nexport type RadialAxisProps = {\n center: [number, number]\n angle: number\n scale: AnyScale\n ticksPosition: 'before' | 'after'\n} & RadialAxisConfig\n\nexport const RadialAxis = ({\n ticksPosition,\n center,\n angle: rawAngle,\n scale,\n ticks: ticksSpec,\n tickSize = 5,\n tickPadding = 5,\n tickRotation: extraRotation = 0,\n tickComponent = RadialAxisTick,\n style,\n}: RadialAxisProps) => {\n const angle = normalizeAngleDegrees(rawAngle)\n\n let textAnchor: 'start' | 'end'\n let lineX: number\n let textX: number\n let tickRotation: number\n\n if (ticksPosition === 'before') {\n tickRotation = 90 + extraRotation\n if (angle <= 90) {\n lineX = -tickSize\n textX = lineX - tickPadding\n textAnchor = 'end'\n } else if (angle < 270) {\n lineX = tickSize\n textX = lineX + tickPadding\n textAnchor = 'start'\n tickRotation -= 180\n } else {\n lineX = -tickSize\n textX = lineX - tickPadding\n textAnchor = 'end'\n }\n } else {\n tickRotation = 90 + extraRotation\n if (angle < 90) {\n lineX = tickSize\n textX = lineX + tickPadding\n textAnchor = 'start'\n } else if (angle < 270) {\n lineX = -tickSize\n textX = lineX - tickPadding\n textAnchor = 'end'\n tickRotation -= 180\n } else {\n lineX = tickSize\n textX = lineX + tickPadding\n textAnchor = 'start'\n }\n }\n\n const ticks = useMemo(() => {\n const values = getScaleTicks(scale, ticksSpec)\n\n return values.map((value, index) => {\n let position = scale(value) as number\n if ('bandwidth' in scale) {\n position += scale.bandwidth() / 2\n }\n\n return {\n key: index,\n label: value,\n position,\n }\n })\n }, [scale, ticksSpec])\n\n const { animate, config: springConfig } = useMotionConfig()\n\n const spring = useSpring<{ rotation: string }>({\n rotation: rawAngle - 90,\n immediate: !animate,\n config: springConfig,\n })\n\n const transition = useTransition<(typeof ticks)[0], RadialAxisTickAnimatedProps>(ticks, {\n keys: tick => tick.key,\n initial: tick => ({\n y: tick.position,\n textX,\n rotation: tickRotation,\n length: lineX,\n opacity: 1,\n }),\n from: tick => ({\n y: tick.position,\n textX,\n rotation: tickRotation,\n length: lineX,\n opacity: 0,\n }),\n enter: tick => ({\n y: tick.position,\n textX,\n rotation: tickRotation,\n length: lineX,\n opacity: 1,\n }),\n update: tick => ({\n y: tick.position,\n textX,\n rotation: tickRotation,\n length: lineX,\n opacity: 1,\n }),\n leave: tick => ({\n y: tick.position,\n textX,\n rotation: tickRotation,\n length: lineX,\n opacity: 0,\n }),\n immediate: !animate,\n config: springConfig,\n })\n\n const theme = useTheme()\n const axisTheme = useExtendedAxisTheme(theme.axis, style)\n\n return (\n <g transform={`translate(${center[0]}, ${center[1]})`} style={{ pointerEvents: 'none' }}>\n <animated.g transform={spring.rotation.to(value => `rotate(${value})`)}>\n {transition((animatedProps, tick) =>\n createElement(tickComponent, {\n key: tick.key,\n label: tick.label,\n y: tick.position,\n textX,\n rotation: tickRotation,\n length: lineX,\n textAnchor,\n theme: axisTheme,\n animated: animatedProps,\n })\n )}\n </animated.g>\n </g>\n )\n}\n"],"names":["CircularAxisTick","_ref","label","theme","animatedProps","animated","_jsxs","g","opacity","children","_jsx","line","x1","y1","x2","y2","style","ticks","Text","dx","textX","dy","textY","dominantBaseline","text","textAnchor","getLinePositions","angle","innerRadius","outerRadius","start","positionFromAngle","degreesToRadians","end","x","y","getTextPosition","radius","position","CircularAxis","type","_ref$center","center","originalStartAngle","startAngle","originalEndAngle","endAngle","scale","_ref$tickSize","tickSize","_ref$tickPadding","tickPadding","_ref$tickComponent","tickComponent","_useMotionConfig","useMotionConfig","animate","springConfig","config","spring","useSpring","immediate","useMemo","values","getScaleTicks","centerScale","map","value","index","key","textRadius","transition","useTransition","keys","tick","initial","_extends","from","enter","update","leave","useTheme","axisTheme","useExtendedAxisTheme","axis","transform","pointerEvents","ArcLine","domain","fill","createElement","RadialGrid","angles","angleValue","id","item","_Fragment","to","v","grid","CircularGrid","radii","bandwidth","strokeOpacity","PolarGrid","enableRadialGrid","angleScale","enableCircularGrid","radiusScale","circularGridTicks","Math","min","apply","range","max","RadialAxisTick","rotation","length","RadialAxis","lineX","tickRotation","ticksPosition","rawAngle","ticksSpec","_ref$tickRotation","extraRotation","normalizeAngleDegrees"],"mappings":"+tBAIO,IAAMA,EAAmB,SAAHC,GAIA,IAHzBC,EAAKD,EAALC,MACAC,EAAKF,EAALE,MACUC,EAAaH,EAAvBI,SAEA,OACIC,EAACD,EAASE,EAAC,CAACC,QAASJ,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