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

Support reanimated 3.3.0 & Expo 0.49 in example #151

Merged
merged 2 commits into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -812,11 +812,11 @@ To customize the formatting of the date/time text, you can supply a `format` fun

### LineChart.Provider

| Prop | Type | Default | Description |
| -------- | --------------------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `data` | `Array<{ timestamp: number, value: number }>` | | The line chart data as an array of timestamps & values (prices). |
| `yRange` | `{ min?: number; max?: number }` | | Set a custom range for the y values of your chart. See [#20](https://github.com/coinjar/react-native-wagmi-charts/issues/20) for a use-case. |
| `xDomain` | `[ min: number; max: number ]` | | Scale x values proportionate to their time scale. Distance between points will be relative to each other instead of same spacing between in point. See [#140](https://github.com/coinjar/react-native-wagmi-charts/issues/140#issuecomment-1614264020) for a use-case. |
| Prop | Type | Default | Description |
| --------- | --------------------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `data` | `Array<{ timestamp: number, value: number }>` | | The line chart data as an array of timestamps & values (prices). |
| `yRange` | `{ min?: number; max?: number }` | | Set a custom range for the y values of your chart. See [#20](https://github.com/coinjar/react-native-wagmi-charts/issues/20) for a use-case. |
| `xDomain` | `[ min: number; max: number ]` | | Scale x values proportionate to their time scale. Distance between points will be relative to each other instead of same spacing between in point. See [#140](https://github.com/coinjar/react-native-wagmi-charts/issues/140#issuecomment-1614264020) for a use-case. |

### LineChart

Expand All @@ -838,16 +838,16 @@ To customize the formatting of the date/time text, you can supply a `format` fun

### LineChart.CursorCrosshair

| Prop | Type | Default | Description |
| ----------------------- | ------------------------------ | --------- | ----------------------------------------------- |
| `color` | `string` | `"black"` | Color of the crosshair dot |
| `size` | `number` | `8` | Size of the crosshair dot |
| `outerSize` | `number` | `32` | Size of the outer crosshair dot (faded dot) |
| `crosshairWrapperProps` | `ViewProps` | | Props of the wrapper component of the crosshair |
| `crosshairProps` | `ViewProps` | | Props of the crosshair dot |
| `crosshairOuterProps` | `ViewProps` | | Props of the crosshair outer dot |
| `snapToPoint` | `boolean` | `false` | Snap cursor to X position of nearest data point |
| `...props` | `LongPressGestureHandlerProps` | | |
| Prop | Type | Default | Description |
| ----------------------- | ------------------------------ | --------- | --------------------------------------------------------------------- |
| `color` | `string` | `"black"` | Color of the crosshair dot |
| `size` | `number` | `8` | Size of the crosshair dot |
| `outerSize` | `number` | `32` | Size of the outer crosshair dot (faded dot) |
| `crosshairWrapperProps` | `ViewProps` | | Props of the wrapper component of the crosshair |
| `crosshairProps` | `ViewProps` | | Props of the crosshair dot |
| `crosshairOuterProps` | `ViewProps` | | Props of the crosshair outer dot |
| `snapToPoint` | `boolean` | `false` | **REACT NATIVE ONLY** Snap cursor to X position of nearest data point |
| `...props` | `LongPressGestureHandlerProps` | | |

### LineChart.CursorLine

Expand Down Expand Up @@ -901,13 +901,13 @@ To customize the formatting of the date/time text, you can supply a `format` fun

### LineChart.Tooltip

| Prop | Type | Default | Description |
| -------------- | --------------------- | ------- | ---------------------------------------------------- |
| `xGutter` | `number` | `8` | X axis gutter in which the tooltip will not pass. |
| `yGutter` | `number` | `8` | Y axis gutter in which the tooltip will not pass. |
| `cursorGutter` | `number` | `48` | Gutter (spacing) between the cursor and the tooltip. |
| `position` | `"top"` or `"bottom"` | `"top"` | Position of the tooltip relative to the cursor. |
| `textStyle` | `{}` | | Style of the tooltip text |
| Prop | Type | Default | Description |
| -------------- | --------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `xGutter` | `number` | `8` | X axis gutter in which the tooltip will not pass. |
| `yGutter` | `number` | `8` | Y axis gutter in which the tooltip will not pass. |
| `cursorGutter` | `number` | `48` | Gutter (spacing) between the cursor and the tooltip. |
| `position` | `"top"` or `"bottom"` | `"top"` | Position of the tooltip relative to the cursor. |
| `textStyle` | `{}` | | Style of the tooltip text |
| `at` | `number` | | Make the tooltip static at the given `data` index (which shows the tooltip always, unless there is interaction with the chart) |

### LineChart.PriceText
Expand Down Expand Up @@ -1066,7 +1066,7 @@ const { value, formatted } = LineChart.usePrice({
**Arguments**

| Variable | Type | Default | Description |
| ----------- |------------------------------------|---------|--------------------------------------|
| ----------- | ---------------------------------- | ------- | ------------------------------------ |
| `format` | `({ value, formatted }) => string` | | Custom format function of the price. |
| `precision` | `number` | `2` | Precision of the price value. |
| `index` | `number` | | Get the price for a specific index |
Expand Down
10 changes: 5 additions & 5 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@
"bumbag-native": "^2.3.0",
"expo": "^49.0.0",
"expo-haptics": "~12.4.0",
"expo-splash-screen": "~0.20.4",
"expo-splash-screen": "~0.20.5",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.72.3",
"react-native-gesture-handler": "~2.12.0",
"react-native-reanimated": "^3.3.0",
"react-native-reanimated": "~3.3.0",
"react-native-svg": "13.9.0",
"react-native-web": "~0.19.6",
"typescript": "^5.1.3"
"react-native-web": "~0.19.6"
},
"devDependencies": {
"@babel/core": "^7.20.0",
Expand All @@ -37,6 +36,7 @@
"babel-preset-expo": "^9.5.0",
"jsonfile": "^6.1.0",
"patch-package": "^6.4.7",
"postinstall-postinstall": "^2.1.0"
"postinstall-postinstall": "^2.1.0",
"typescript": "^5.1.3"
}
}
Loading