coinjar / react-native-wagmi-charts

A sweet & simple chart library for React Native that will make us feel like We're All Gonna Make It.
MIT License
589 stars 116 forks source link

Crosshair snapToPoint crashing #153

Closed Rayne182 closed 1 year ago

Rayne182 commented 1 year ago

I am using Expo v48.0.7 and wagmi-charts v2.3.0 and I am trying to implement the following:

<LineChart.CursorCrosshair 
    snapToPoint // I have tried: ={true} , ="true" , ={"true"}
    color={COLORS.primary}
>
       <LineChart.Tooltip />
</LineChart.CursorCrosshair>

And the error I get: "Uncaught error - undefined is not a function. linearScalePositionAndIndex (..\line\Cursor.tsx)"

cam-shaw commented 1 year ago

@Rayne182 There is a known crash due to an incorrect version of d3-array in the project. Add this to your package.json file, run yarn install and let me know if it resolves the issue.

"resolutions": {
  "d3-array": "3.1.6",
}
Rayne182 commented 1 year ago

This solved it for me, thank you so much!