@@ -10,7 +10,7 @@ import {
1010} from "react-native-gesture-handler" ;
1111import { type MutableRefObject } from "react" ;
1212import { ZoomTransform } from "d3-zoom" ;
13- import type { ScaleLinear } from "d3-scale" ;
13+ import type { ScaleLinear , ScaleLogarithmic } from "d3-scale" ;
1414import isEqual from "react-fast-compare" ;
1515import type {
1616 AxisProps ,
@@ -91,7 +91,6 @@ type CartesianChartProps<
9191 args : CartesianChartRenderArg < RawData , YK > ,
9292 ) => React . ReactNode ;
9393 axisOptions ?: Partial < Omit < AxisProps < RawData , XK , YK > , "xScale" | "yScale" > > ;
94-
9594 onChartBoundsChange ?: ( bounds : ChartBounds ) => void ;
9695 onScaleChange ?: (
9796 xScale : ScaleLinear < number , number > ,
@@ -164,9 +163,10 @@ function CartesianChartContent<
164163} : CartesianChartProps < RawData , XK , YK > ) {
165164 const [ size , setSize ] = React . useState ( { width : 0 , height : 0 } ) ;
166165 const chartBoundsRef = React . useRef < ChartBounds | undefined > ( undefined ) ;
167- const xScaleRef = React . useRef < ScaleLinear < number , number > | undefined > (
168- undefined ,
169- ) ;
166+ const xScaleRef = React . useRef <
167+ ScaleLogarithmic < number , number > | ScaleLinear < number , number > | undefined
168+ > ( undefined ) ;
169+
170170 const yScaleRef = React . useRef < ScaleLinear < number , number > | undefined > (
171171 undefined ,
172172 ) ;
@@ -239,6 +239,7 @@ function CartesianChartContent<
239239 yAxes : normalizedAxisProps . yAxes ,
240240 viewport,
241241 labelRotate : normalizedAxisProps . xAxis . labelRotate ,
242+ axisScales : axisOptions ?. axisScales ,
242243 } ) ;
243244
244245 const primaryYAxis = yAxes [ 0 ] ;
0 commit comments