Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render Error LongPressGestureHandler #158

Open
Dimanokus opened this issue Aug 28, 2023 · 1 comment
Open

Render Error LongPressGestureHandler #158

Dimanokus opened this issue Aug 28, 2023 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@Dimanokus
Copy link

Hi? when i add <CandlestickChart.Crosshair /> in my chart i have error
LongPressGestureHandler must be used as a descendant of GestureHandlerRootView. Otherwise the gestures will not be recognized. See https://docs.swmansion.com/ /react-native-gesture-handler/docs/installation for more details.

My code:

<CandlestickChart.Provider data={[
        {
          timestamp: 1625945400000,
          open: 33575.25,
          high: 33600.52,
          low: 33475.12,
          close: 33520.11,
        },
        {
          timestamp: 1625946300000,
          open: 33545.25,
          high: 33560.52,
          low: 33510.12,
          close: 33520.11,
        },
        {
          timestamp: 1625947200000,
          open: 33510.25,
          high: 33515.52,
          low: 33250.12,
          close: 33250.11,
        },
        {
          timestamp: 1625948100000,
          open: 33215.25,
          high: 33430.52,
          low: 33215.12,
          close: 33420.11,
        },
      ]}>
        <CandlestickChart>
          <CandlestickChart.Candles />
          <CandlestickChart.Crosshair />
        </CandlestickChart>
      </CandlestickChart.Provider>

My packages:

"dependencies": {
    "@react-native-async-storage/async-storage": "^1.18.1",
    "@react-navigation/native": "^6.1.6",
    "@react-navigation/native-stack": "^6.9.12",
    "axios": "^1.4.0",
    "formik": "^2.2.9",
    "i18next": "^22.4.15",
    "metro-config": "^0.76.4",
    "nice-try": "^3.0.1",
    "react": "18.2.0",
    "react-i18next": "^12.2.2",
    "react-native": "0.71.8",
    "react-native-bouncy-checkbox": "^3.0.7",
    "react-native-calendars": "^1.1300.0",
    "react-native-charts-wrapper": "^0.5.11",
    "react-native-device-info": "^10.8.0",
    "react-native-element-dropdown": "^2.9.0",
    "react-native-gesture-handler": "^2.12.1",
    "react-native-gifted-charts": "^1.3.2",
    "react-native-haptic-feedback": "^2.0.3",
    "react-native-keyboard-aware-scroll-view": "^0.9.5",
    "react-native-linear-gradient": "^2.8.2",
    "react-native-marquee-view": "^1.0.5",
    "react-native-popup-menu": "^0.16.1",
    "react-native-reanimated": "^3.4.2",
    "react-native-restart": "^0.0.27",
    "react-native-root-toast": "^3.4.1",
    "react-native-safe-area-context": "^4.5.2",
    "react-native-screens": "^3.20.0",
    "react-native-svg": "^13.12.0",
    "react-native-svg-transformer": "^1.0.0",
    "react-native-wagmi-charts": "^2.3.0",
    "victory-native": "^36.6.11",
    "yup": "^1.1.1"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@babel/preset-env": "^7.20.0",
    "@babel/runtime": "^7.20.0",
    "@react-native-community/eslint-config": "^3.2.0",
    "@tsconfig/react-native": "^2.0.2",
    "@types/jest": "^29.2.1",
    "@types/react": "^18.0.24",
    "@types/react-test-renderer": "^18.0.0",
    "babel-jest": "^29.2.1",
    "eslint": "^8.19.0",
    "jest": "^29.2.1",
    "metro-react-native-babel-preset": "0.73.9",
    "prettier": "^2.4.1",
    "react-test-renderer": "18.2.0",
    "typescript": "4.8.4"
  },
  "jest": {
    "preset": "react-native"
  }
@flespindola
Copy link

have you tried wrapper your <CandlestickChart.Provider> with <GestureHandlerRootView> ?

@honeybadger26 honeybadger26 added the help wanted Extra attention is needed label Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants