@@ -4,7 +4,7 @@ import type { ComputedDatum, CustomLayer, Datum } from '@nivo/line';
4
4
import { Crosshair } from '@nivo/tooltip' ;
5
5
import { area , curveMonotoneX } from 'd3-shape' ;
6
6
import moment from 'moment' ;
7
- import React , { useMemo , useState } from 'react' ;
7
+ import React , { useContext , useEffect , useMemo , useState } from 'react' ;
8
8
import {
9
9
Checkbox ,
10
10
Dimmer ,
@@ -182,6 +182,7 @@ const PropertyPriceChart: React.FC<PropertyPriceChartProps> = (props) => {
182
182
</ div >
183
183
) ;
184
184
} }
185
+ animate = { false }
185
186
axisBottom = { null }
186
187
axisLeft = { {
187
188
format : ( value ) => `${ value } €` ,
@@ -218,6 +219,7 @@ const PropertyPriceChart: React.FC<PropertyPriceChartProps> = (props) => {
218
219
tickValues : 2 ,
219
220
} }
220
221
gridYValues = { 4 }
222
+ animate = { false }
221
223
axisBottom = { {
222
224
format : ( x ) => {
223
225
return moment ( x ) . format (
@@ -370,11 +372,11 @@ const WarningLayer: CustomLayer = (props) => {
370
372
371
373
const CustomCrosshair : CustomLayer = ( props ) => {
372
374
const [ crosshairPosition , setCrosshairPosition ] =
373
- React . useContext ( CrosshairContext ) ;
375
+ useContext ( CrosshairContext ) ;
374
376
375
377
const { currentSlice } = props as unknown as { currentSlice : Datum } ;
376
378
377
- React . useEffect ( ( ) => {
379
+ useEffect ( ( ) => {
378
380
const position = currentSlice
379
381
? { x : currentSlice . x , y : currentSlice . y }
380
382
: undefined ;
0 commit comments