@@ -16,7 +16,7 @@ import {
16
16
import { styled } from '@mui/material/styles' ;
17
17
import { useXAxes , useYAxes } from '@mui/x-charts/hooks' ;
18
18
import { rafThrottle } from '@mui/x-internals/rafThrottle' ;
19
- import { ChartsZoomValueTooltip } from './ChartsZoomValueTooltip ' ;
19
+ import { ChartsTooltipZoomSliderValue } from './ChartsTooltipZoomSliderValue ' ;
20
20
import {
21
21
selectorChartAxisZoomData ,
22
22
UseChartProZoomSignature ,
@@ -82,7 +82,7 @@ export function ChartAxisZoomSlider({ axisDirection, axisId }: ChartZoomSliderPr
82
82
let x : number ;
83
83
let y : number ;
84
84
let reverse : boolean ;
85
- let position : 'top' | 'bottom' | 'left' | 'right' ;
85
+ let axisPosition : 'top' | 'bottom' | 'left' | 'right' ;
86
86
87
87
if ( axisDirection === 'x' ) {
88
88
const axis = xAxis [ axisId ] ;
@@ -99,7 +99,7 @@ export function ChartAxisZoomSlider({ axisDirection, axisId }: ChartZoomSliderPr
99
99
? drawingArea . top + drawingArea . height + axis . offset + axisSize + ZOOM_SLIDER_MARGIN
100
100
: drawingArea . top - axis . offset - axisSize - ZOOM_SLIDER_SIZE - ZOOM_SLIDER_MARGIN ;
101
101
reverse = axis . reverse ?? false ;
102
- position = axis . position ?? 'bottom' ;
102
+ axisPosition = axis . position ?? 'bottom' ;
103
103
} else {
104
104
const axis = yAxis [ axisId ] ;
105
105
@@ -115,7 +115,7 @@ export function ChartAxisZoomSlider({ axisDirection, axisId }: ChartZoomSliderPr
115
115
: drawingArea . left - axis . offset - axisSize - ZOOM_SLIDER_SIZE - ZOOM_SLIDER_MARGIN ;
116
116
y = drawingArea . top ;
117
117
reverse = axis . reverse ?? false ;
118
- position = axis . position ?? 'left' ;
118
+ axisPosition = axis . position ?? 'left' ;
119
119
}
120
120
121
121
const backgroundRectOffset = ( ZOOM_SLIDER_SIZE - ZOOM_SLIDER_BACKGROUND_SIZE ) / 2 ;
@@ -133,7 +133,7 @@ export function ChartAxisZoomSlider({ axisDirection, axisId }: ChartZoomSliderPr
133
133
< ChartAxisZoomSliderSpan
134
134
zoomData = { zoomData }
135
135
axisId = { axisId }
136
- position = { position }
136
+ axisPosition = { axisPosition }
137
137
axisDirection = { axisDirection }
138
138
reverse = { reverse }
139
139
/>
@@ -147,14 +147,14 @@ const zoomValueFormatter = (value: number) => formatter.format(value);
147
147
function ChartAxisZoomSliderSpan ( {
148
148
axisId,
149
149
axisDirection,
150
- position ,
150
+ axisPosition ,
151
151
zoomData,
152
152
reverse,
153
153
valueFormatter = zoomValueFormatter ,
154
154
} : {
155
155
axisId : AxisId ;
156
156
axisDirection : 'x' | 'y' ;
157
- position : 'top' | 'bottom' | 'left' | 'right' ;
157
+ axisPosition : 'top' | 'bottom' | 'left' | 'right' ;
158
158
zoomData : ZoomData ;
159
159
reverse : boolean ;
160
160
valueFormatter ?: ( value : number ) => string ;
@@ -429,20 +429,20 @@ function ChartAxisZoomSliderSpan({
429
429
onPointerLeave = { ( ) => setShowTooltip ( null ) }
430
430
placement = "end"
431
431
/>
432
- < ChartsZoomValueTooltip
432
+ < ChartsTooltipZoomSliderValue
433
433
anchorEl = { startHandleEl }
434
434
open = { showTooltip === 'start' || showTooltip === 'both' }
435
- placement = { position }
435
+ placement = { axisPosition }
436
436
>
437
437
{ valueFormatter ( zoomData . start ) }
438
- </ ChartsZoomValueTooltip >
439
- < ChartsZoomValueTooltip
438
+ </ ChartsTooltipZoomSliderValue >
439
+ < ChartsTooltipZoomSliderValue
440
440
anchorEl = { endHandleEl }
441
441
open = { showTooltip === 'end' || showTooltip === 'both' }
442
- placement = { position }
442
+ placement = { axisPosition }
443
443
>
444
444
{ valueFormatter ( zoomData . end ) }
445
- </ ChartsZoomValueTooltip >
445
+ </ ChartsTooltipZoomSliderValue >
446
446
</ React . Fragment >
447
447
) ;
448
448
}
0 commit comments