@@ -5,6 +5,7 @@ import Stack from '@mui/material/Stack';
55import Typography from '@mui/material/Typography' ;
66import { ChartsTooltipContainer , useAxesTooltip } from '@mui/x-charts/ChartsTooltip' ;
77import { usePolarGeometry } from '@mui/x-charts/hooks' ;
8+ import type { D3OrdinalScale , D3ContinuousScale } from '@mui/x-charts/models' ;
89import {
910 euAverageTrust2025 ,
1011 europeanYouthTrust ,
@@ -92,7 +93,9 @@ export function PreviousTrustData({
9293 return null ;
9394 }
9495
95- const { cx, cy, angleScale, bandwidth, radiusScale, point } = geometry ;
96+ const { cx, cy, bandwidth, point } = geometry ;
97+ const angleScale = geometry . angleScale as D3OrdinalScale ;
98+ const radiusScale = geometry . radiusScale as D3ContinuousScale ;
9699
97100 return (
98101 < g transform = { `translate(${ cx } ${ cy } )` } >
@@ -243,7 +246,8 @@ export function EuAverageRing() {
243246 return null ;
244247 }
245248
246- const { cx, cy, radiusScale } = geometry ;
249+ const { cx, cy } = geometry ;
250+ const radiusScale = geometry . radiusScale as D3ContinuousScale ;
247251 const radius = radiusScale ( euAverageTrust2025 ) ;
248252
249253 return (
@@ -269,13 +273,3 @@ export function EuAverageRing() {
269273 </ g >
270274 ) ;
271275}
272-
273- export interface PolarGeometry {
274- cx : number ;
275- cy : number ;
276- angleScale : ( value : string ) => number | undefined ;
277- bandwidth : number ;
278- radiusScale : ( value : number ) => number ;
279- // Polar (0 = up, clockwise) to local cartesian, relative to the center.
280- point : ( radius : number , angle : number ) => readonly [ number , number ] ;
281- }
0 commit comments