vladanyes / react-native-skia-charts

High-performance charts for react-native 🚀
MIT License
140 stars 9 forks source link

_reactNativeSkia.useValue is not a function #12

Open feri-irawan opened 2 weeks ago

feri-irawan commented 2 weeks ago

My package.json dependecies:

    "d3-scale": "^4.0.2",
    "react-native-reanimated": "~3.10.1",
    "react-native-gesture-handler": "^2.16.2",
    "@shopify/react-native-skia": "1.2.3",
    "react-native-skia-charts": "^0.0.60",
    "expo": "~51.0.14",

my screens.tsx

import { ThemedView } from '@/components/ThemedView'
import { LineChart } from 'react-native-skia-charts'

export default function Screens() {
  return (
    <ThemedView>
      <LineChart
        datasets={[
          {
            label: 'Line 1',
            data: [
              { x: '2022-01-01', y: 0 },
              { x: '2022-01-02', y: 10 },
              { x: '2022-01-03', y: 5 },
              { x: '2022-01-04', y: 15 },
              { x: '2022-01-05', y: 20 },
              { x: '2022-01-06', y: 25 },
              { x: '2022-01-07', y: 30 },
            ],
          },
        ]}
        fontFile={require('../../assets/fonts/SpaceMono-Regular.ttf')}
      />
    </ThemedView>
  )
}

image

vladanyes commented 1 week ago

hey @feri-irawan , unfortunately, this lib uses outdated skia version, try to downgrade skia. "@shopify/react-native-skia": "0.1.156",