react-native-wagmi-charts 2.4.1 → 2.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/lib/commonjs/charts/candle/Candle.js +1 -1
- package/lib/commonjs/charts/candle/Candle.js.map +1 -1
- package/lib/commonjs/charts/candle/Candles.js +1 -1
- package/lib/commonjs/charts/candle/Candles.js.map +1 -1
- package/lib/commonjs/charts/candle/Chart.js +1 -1
- package/lib/commonjs/charts/candle/Chart.js.map +1 -1
- package/lib/commonjs/charts/candle/Context.js +1 -1
- package/lib/commonjs/charts/candle/Context.js.map +1 -1
- package/lib/commonjs/charts/candle/Crosshair.js +1 -1
- package/lib/commonjs/charts/candle/Crosshair.js.map +1 -1
- package/lib/commonjs/charts/candle/CrosshairTooltip.js +1 -1
- package/lib/commonjs/charts/candle/CrosshairTooltip.js.map +1 -1
- package/lib/commonjs/charts/candle/DatetimeText.js +0 -3
- package/lib/commonjs/charts/candle/DatetimeText.js.map +1 -1
- package/lib/commonjs/charts/candle/Line.js +3 -5
- package/lib/commonjs/charts/candle/Line.js.map +1 -1
- package/lib/commonjs/charts/candle/PriceText.js +0 -3
- package/lib/commonjs/charts/candle/PriceText.js.map +1 -1
- package/lib/commonjs/charts/candle/index.js.map +1 -1
- package/lib/commonjs/charts/candle/types.js.map +1 -1
- package/lib/commonjs/charts/candle/useCandleData.js.map +1 -1
- package/lib/commonjs/charts/candle/useCandlestickChart.js +1 -1
- package/lib/commonjs/charts/candle/useCandlestickChart.js.map +1 -1
- package/lib/commonjs/charts/candle/useDatetime.js.map +1 -1
- package/lib/commonjs/charts/candle/usePrice.js.map +1 -1
- package/lib/commonjs/charts/candle/utils/getDomain.js.map +1 -1
- package/lib/commonjs/charts/candle/utils/getHeight.js.map +1 -1
- package/lib/commonjs/charts/candle/utils/getPrice.js.map +1 -1
- package/lib/commonjs/charts/candle/utils/getY.js.map +1 -1
- package/lib/commonjs/charts/candle/utils/index.js.map +1 -1
- package/lib/commonjs/charts/line/Chart.js +4 -5
- package/lib/commonjs/charts/line/Chart.js.map +1 -1
- package/lib/commonjs/charts/line/ChartPath.js +9 -3
- package/lib/commonjs/charts/line/ChartPath.js.map +1 -1
- package/lib/commonjs/charts/line/Context.js +3 -2
- package/lib/commonjs/charts/line/Context.js.map +1 -1
- package/lib/commonjs/charts/line/Cursor.js +3 -3
- package/lib/commonjs/charts/line/Cursor.js.map +1 -1
- package/lib/commonjs/charts/line/CursorCrosshair.js +1 -1
- package/lib/commonjs/charts/line/CursorCrosshair.js.map +1 -1
- package/lib/commonjs/charts/line/CursorLine.js +1 -1
- package/lib/commonjs/charts/line/CursorLine.js.map +1 -1
- package/lib/commonjs/charts/line/Data.js +3 -5
- package/lib/commonjs/charts/line/Data.js.map +1 -1
- package/lib/commonjs/charts/line/DatetimeText.js +0 -3
- package/lib/commonjs/charts/line/DatetimeText.js.map +1 -1
- package/lib/commonjs/charts/line/Dot.js +3 -3
- package/lib/commonjs/charts/line/Dot.js.map +1 -1
- package/lib/commonjs/charts/line/Gradient.js +1 -1
- package/lib/commonjs/charts/line/Gradient.js.map +1 -1
- package/lib/commonjs/charts/line/Group.js +2 -4
- package/lib/commonjs/charts/line/Group.js.map +1 -1
- package/lib/commonjs/charts/line/Highlight.js +1 -1
- package/lib/commonjs/charts/line/Highlight.js.map +1 -1
- package/lib/commonjs/charts/line/HorizontalLine.js +1 -1
- package/lib/commonjs/charts/line/HorizontalLine.js.map +1 -1
- package/lib/commonjs/charts/line/HoverTrap/index.js +1 -3
- package/lib/commonjs/charts/line/HoverTrap/index.js.map +1 -1
- package/lib/commonjs/charts/line/HoverTrap/index.web.js +3 -3
- package/lib/commonjs/charts/line/HoverTrap/index.web.js.map +1 -1
- package/lib/commonjs/charts/line/LineChartPathContext.js.map +1 -1
- package/lib/commonjs/charts/line/Path.js +1 -1
- package/lib/commonjs/charts/line/Path.js.map +1 -1
- package/lib/commonjs/charts/line/PriceText.js +0 -3
- package/lib/commonjs/charts/line/PriceText.js.map +1 -1
- package/lib/commonjs/charts/line/Tooltip.js +1 -1
- package/lib/commonjs/charts/line/Tooltip.js.map +1 -1
- package/lib/commonjs/charts/line/index.js.map +1 -1
- package/lib/commonjs/charts/line/types.js.map +1 -1
- package/lib/commonjs/charts/line/useAnimatedPath.js.map +1 -1
- package/lib/commonjs/charts/line/useCurrentY.js.map +1 -1
- package/lib/commonjs/charts/line/useDatetime.js +4 -2
- package/lib/commonjs/charts/line/useDatetime.js.map +1 -1
- package/lib/commonjs/charts/line/useLineChart.js +1 -1
- package/lib/commonjs/charts/line/useLineChart.js.map +1 -1
- package/lib/commonjs/charts/line/usePrice.js +6 -1
- package/lib/commonjs/charts/line/usePrice.js.map +1 -1
- package/lib/commonjs/charts/line/utils/getArea.js +2 -2
- package/lib/commonjs/charts/line/utils/getArea.js.map +1 -1
- package/lib/commonjs/charts/line/utils/getDomain.js.map +1 -1
- package/lib/commonjs/charts/line/utils/getPath.js +2 -2
- package/lib/commonjs/charts/line/utils/getPath.js.map +1 -1
- package/lib/commonjs/charts/line/utils/getXPositionForCurve.js +5 -1
- package/lib/commonjs/charts/line/utils/getXPositionForCurve.js.map +1 -1
- package/lib/commonjs/charts/line/utils/index.js.map +1 -1
- package/lib/commonjs/charts/line/utils/interpolatePath.js.map +1 -1
- package/lib/commonjs/charts/line/utils/lineChartDataPropToArray.js.map +1 -1
- package/lib/commonjs/components/AnimatedText.js +1 -1
- package/lib/commonjs/components/AnimatedText.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/utils/formatDatetime.js.map +1 -1
- package/lib/commonjs/utils/formatPrice.js.map +1 -1
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/commonjs/utils/usePrevious.js +1 -1
- package/lib/commonjs/utils/usePrevious.js.map +1 -1
- package/lib/module/charts/candle/Candle.js.map +1 -1
- package/lib/module/charts/candle/Candles.js.map +1 -1
- package/lib/module/charts/candle/Chart.js.map +1 -1
- package/lib/module/charts/candle/Context.js.map +1 -1
- package/lib/module/charts/candle/Crosshair.js.map +1 -1
- package/lib/module/charts/candle/CrosshairTooltip.js.map +1 -1
- package/lib/module/charts/candle/DatetimeText.js +0 -1
- package/lib/module/charts/candle/DatetimeText.js.map +1 -1
- package/lib/module/charts/candle/Line.js +0 -1
- package/lib/module/charts/candle/Line.js.map +1 -1
- package/lib/module/charts/candle/PriceText.js +0 -1
- package/lib/module/charts/candle/PriceText.js.map +1 -1
- package/lib/module/charts/candle/index.js.map +1 -1
- package/lib/module/charts/candle/types.js.map +1 -1
- package/lib/module/charts/candle/useCandleData.js.map +1 -1
- package/lib/module/charts/candle/useCandlestickChart.js.map +1 -1
- package/lib/module/charts/candle/useDatetime.js.map +1 -1
- package/lib/module/charts/candle/usePrice.js.map +1 -1
- package/lib/module/charts/candle/utils/getDomain.js.map +1 -1
- package/lib/module/charts/candle/utils/getHeight.js.map +1 -1
- package/lib/module/charts/candle/utils/getPrice.js.map +1 -1
- package/lib/module/charts/candle/utils/getY.js.map +1 -1
- package/lib/module/charts/candle/utils/index.js.map +1 -1
- package/lib/module/charts/line/Chart.js +3 -4
- package/lib/module/charts/line/Chart.js.map +1 -1
- package/lib/module/charts/line/ChartPath.js +8 -2
- package/lib/module/charts/line/ChartPath.js.map +1 -1
- package/lib/module/charts/line/Context.js +2 -1
- package/lib/module/charts/line/Context.js.map +1 -1
- package/lib/module/charts/line/Cursor.js +2 -2
- package/lib/module/charts/line/Cursor.js.map +1 -1
- package/lib/module/charts/line/CursorCrosshair.js.map +1 -1
- package/lib/module/charts/line/CursorLine.js.map +1 -1
- package/lib/module/charts/line/Data.js +1 -1
- package/lib/module/charts/line/Data.js.map +1 -1
- package/lib/module/charts/line/DatetimeText.js +0 -1
- package/lib/module/charts/line/DatetimeText.js.map +1 -1
- package/lib/module/charts/line/Dot.js +2 -2
- package/lib/module/charts/line/Dot.js.map +1 -1
- package/lib/module/charts/line/Gradient.js.map +1 -1
- package/lib/module/charts/line/Group.js +0 -1
- package/lib/module/charts/line/Group.js.map +1 -1
- package/lib/module/charts/line/Highlight.js.map +1 -1
- package/lib/module/charts/line/HorizontalLine.js.map +1 -1
- package/lib/module/charts/line/HoverTrap/index.js +0 -1
- package/lib/module/charts/line/HoverTrap/index.js.map +1 -1
- package/lib/module/charts/line/HoverTrap/index.web.js +2 -2
- package/lib/module/charts/line/HoverTrap/index.web.js.map +1 -1
- package/lib/module/charts/line/LineChartPathContext.js.map +1 -1
- package/lib/module/charts/line/Path.js.map +1 -1
- package/lib/module/charts/line/PriceText.js +0 -1
- package/lib/module/charts/line/PriceText.js.map +1 -1
- package/lib/module/charts/line/Tooltip.js.map +1 -1
- package/lib/module/charts/line/index.js.map +1 -1
- package/lib/module/charts/line/types.js.map +1 -1
- package/lib/module/charts/line/useAnimatedPath.js.map +1 -1
- package/lib/module/charts/line/useCurrentY.js.map +1 -1
- package/lib/module/charts/line/useDatetime.js +4 -2
- package/lib/module/charts/line/useDatetime.js.map +1 -1
- package/lib/module/charts/line/useLineChart.js.map +1 -1
- package/lib/module/charts/line/usePrice.js +6 -1
- package/lib/module/charts/line/usePrice.js.map +1 -1
- package/lib/module/charts/line/utils/getArea.js +1 -1
- package/lib/module/charts/line/utils/getArea.js.map +1 -1
- package/lib/module/charts/line/utils/getDomain.js.map +1 -1
- package/lib/module/charts/line/utils/getPath.js +1 -1
- package/lib/module/charts/line/utils/getPath.js.map +1 -1
- package/lib/module/charts/line/utils/getXPositionForCurve.js +5 -1
- package/lib/module/charts/line/utils/getXPositionForCurve.js.map +1 -1
- package/lib/module/charts/line/utils/index.js.map +1 -1
- package/lib/module/charts/line/utils/interpolatePath.js.map +1 -1
- package/lib/module/charts/line/utils/lineChartDataPropToArray.js.map +1 -1
- package/lib/module/components/AnimatedText.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/utils/formatDatetime.js.map +1 -1
- package/lib/module/utils/formatPrice.js.map +1 -1
- package/lib/module/utils/index.js.map +1 -1
- package/lib/module/utils/usePrevious.js.map +1 -1
- package/lib/typescript/src/charts/candle/Candle.d.ts +2 -2
- package/lib/typescript/src/charts/candle/Candle.d.ts.map +1 -1
- package/lib/typescript/src/charts/candle/Candles.d.ts +1 -2
- package/lib/typescript/src/charts/candle/Candles.d.ts.map +1 -1
- package/lib/typescript/src/charts/candle/Chart.d.ts +1 -1
- package/lib/typescript/src/charts/candle/Chart.d.ts.map +1 -1
- package/lib/typescript/src/charts/candle/Context.d.ts +1 -1
- package/lib/typescript/src/charts/candle/Context.d.ts.map +1 -1
- package/lib/typescript/src/charts/candle/Crosshair.d.ts +1 -1
- package/lib/typescript/src/charts/candle/Crosshair.d.ts.map +1 -1
- package/lib/typescript/src/charts/candle/CrosshairTooltip.d.ts +4 -4
- package/lib/typescript/src/charts/candle/CrosshairTooltip.d.ts.map +1 -1
- package/lib/typescript/src/charts/candle/DatetimeText.d.ts +1 -2
- package/lib/typescript/src/charts/candle/DatetimeText.d.ts.map +1 -1
- package/lib/typescript/src/charts/candle/Line.d.ts +1 -2
- package/lib/typescript/src/charts/candle/Line.d.ts.map +1 -1
- package/lib/typescript/src/charts/candle/PriceText.d.ts +1 -2
- package/lib/typescript/src/charts/candle/PriceText.d.ts.map +1 -1
- package/lib/typescript/src/charts/candle/index.d.ts +2 -3
- package/lib/typescript/src/charts/candle/index.d.ts.map +1 -1
- package/lib/typescript/src/charts/candle/types.d.ts +3 -3
- package/lib/typescript/src/charts/candle/types.d.ts.map +1 -1
- package/lib/typescript/src/charts/candle/useCandleData.d.ts +2 -2
- package/lib/typescript/src/charts/candle/useCandleData.d.ts.map +1 -1
- package/lib/typescript/src/charts/candle/useDatetime.d.ts +3 -3
- package/lib/typescript/src/charts/candle/useDatetime.d.ts.map +1 -1
- package/lib/typescript/src/charts/candle/usePrice.d.ts +3 -3
- package/lib/typescript/src/charts/candle/usePrice.d.ts.map +1 -1
- package/lib/typescript/src/charts/line/Chart.d.ts +1 -1
- package/lib/typescript/src/charts/line/Chart.d.ts.map +1 -1
- package/lib/typescript/src/charts/line/ChartPath.d.ts +1 -1
- package/lib/typescript/src/charts/line/ChartPath.d.ts.map +1 -1
- package/lib/typescript/src/charts/line/Context.d.ts +1 -1
- package/lib/typescript/src/charts/line/Context.d.ts.map +1 -1
- package/lib/typescript/src/charts/line/Cursor.d.ts +1 -1
- package/lib/typescript/src/charts/line/Cursor.d.ts.map +1 -1
- package/lib/typescript/src/charts/line/CursorCrosshair.d.ts +1 -1
- package/lib/typescript/src/charts/line/CursorCrosshair.d.ts.map +1 -1
- package/lib/typescript/src/charts/line/CursorLine.d.ts +1 -1
- package/lib/typescript/src/charts/line/CursorLine.d.ts.map +1 -1
- package/lib/typescript/src/charts/line/Data.d.ts +3 -4
- package/lib/typescript/src/charts/line/Data.d.ts.map +1 -1
- package/lib/typescript/src/charts/line/DatetimeText.d.ts +1 -2
- package/lib/typescript/src/charts/line/DatetimeText.d.ts.map +1 -1
- package/lib/typescript/src/charts/line/Dot.d.ts +1 -2
- package/lib/typescript/src/charts/line/Dot.d.ts.map +1 -1
- package/lib/typescript/src/charts/line/Gradient.d.ts +1 -1
- package/lib/typescript/src/charts/line/Gradient.d.ts.map +1 -1
- package/lib/typescript/src/charts/line/Group.d.ts +1 -2
- package/lib/typescript/src/charts/line/Group.d.ts.map +1 -1
- package/lib/typescript/src/charts/line/Highlight.d.ts +1 -2
- package/lib/typescript/src/charts/line/Highlight.d.ts.map +1 -1
- package/lib/typescript/src/charts/line/HorizontalLine.d.ts +1 -2
- package/lib/typescript/src/charts/line/HorizontalLine.d.ts.map +1 -1
- package/lib/typescript/src/charts/line/HoverTrap/index.d.ts +1 -2
- package/lib/typescript/src/charts/line/HoverTrap/index.d.ts.map +1 -1
- package/lib/typescript/src/charts/line/HoverTrap/index.web.d.ts +1 -2
- package/lib/typescript/src/charts/line/HoverTrap/index.web.d.ts.map +1 -1
- package/lib/typescript/src/charts/line/Path.d.ts +1 -2
- package/lib/typescript/src/charts/line/Path.d.ts.map +1 -1
- package/lib/typescript/src/charts/line/PriceText.d.ts +1 -2
- package/lib/typescript/src/charts/line/PriceText.d.ts.map +1 -1
- package/lib/typescript/src/charts/line/Tooltip.d.ts +1 -1
- package/lib/typescript/src/charts/line/Tooltip.d.ts.map +1 -1
- package/lib/typescript/src/charts/line/index.d.ts +1 -2
- package/lib/typescript/src/charts/line/index.d.ts.map +1 -1
- package/lib/typescript/src/charts/line/types.d.ts +4 -4
- package/lib/typescript/src/charts/line/types.d.ts.map +1 -1
- package/lib/typescript/src/charts/line/useCurrentY.d.ts +1 -3
- package/lib/typescript/src/charts/line/useCurrentY.d.ts.map +1 -1
- package/lib/typescript/src/charts/line/useDatetime.d.ts +2 -6
- package/lib/typescript/src/charts/line/useDatetime.d.ts.map +1 -1
- package/lib/typescript/src/charts/line/useLineChart.d.ts +5 -13
- package/lib/typescript/src/charts/line/useLineChart.d.ts.map +1 -1
- package/lib/typescript/src/charts/line/usePrice.d.ts +2 -6
- package/lib/typescript/src/charts/line/usePrice.d.ts.map +1 -1
- package/lib/typescript/src/charts/line/utils/getXPositionForCurve.d.ts.map +1 -1
- package/lib/typescript/src/components/AnimatedText.d.ts +4 -5
- package/lib/typescript/src/components/AnimatedText.d.ts.map +1 -1
- package/package.json +19 -13
- package/src/charts/candle/Candle.tsx +2 -8
- package/src/charts/candle/Context.tsx +3 -4
- package/src/charts/candle/CrosshairTooltip.tsx +12 -5
- package/src/charts/candle/DatetimeText.tsx +0 -1
- package/src/charts/candle/Line.tsx +0 -1
- package/src/charts/candle/PriceText.tsx +0 -1
- package/src/charts/candle/types.ts +3 -3
- package/src/charts/candle/useCandleData.ts +4 -4
- package/src/charts/candle/useDatetime.ts +4 -3
- package/src/charts/candle/usePrice.ts +4 -3
- package/src/charts/line/Chart.tsx +4 -5
- package/src/charts/line/ChartPath.tsx +4 -0
- package/src/charts/line/Context.tsx +10 -7
- package/src/charts/line/Cursor.tsx +3 -3
- package/src/charts/line/Data.tsx +1 -1
- package/src/charts/line/DatetimeText.tsx +0 -1
- package/src/charts/line/Dot.tsx +2 -0
- package/src/charts/line/Group.tsx +0 -1
- package/src/charts/line/HoverTrap/index.tsx +0 -2
- package/src/charts/line/HoverTrap/index.web.tsx +2 -2
- package/src/charts/line/PriceText.tsx +0 -1
- package/src/charts/line/types.ts +4 -4
- package/src/charts/line/useDatetime.ts +7 -2
- package/src/charts/line/usePrice.ts +8 -2
- package/src/charts/line/utils/getArea.ts +1 -1
- package/src/charts/line/utils/getPath.ts +1 -1
- package/src/charts/line/utils/getXPositionForCurve.ts +11 -1
- package/src/components/AnimatedText.tsx +3 -3
- package/src/utils/formatPrice.ts +1 -1
- package/.DS_Store +0 -0
- package/.editorconfig +0 -15
- package/.gitattributes +0 -3
- package/.gitignore +0 -60
- package/.husky/pre-commit +0 -4
- package/.prettierrc.js +0 -5
- package/.yarnrc +0 -3
- package/babel.config.js +0 -3
- package/example/.expo/README.md +0 -8
- package/example/.expo/devices.json +0 -3
- package/example/README.md +0 -41
- package/example/app.json +0 -22
- package/example/babel.config.js +0 -23
- package/example/index.js +0 -8
- package/example/metro.config.js +0 -40
- package/example/package.json +0 -42
- package/example/src/App.tsx +0 -64
- package/example/src/CandlestickChart.tsx +0 -155
- package/example/src/LineChart.tsx +0 -268
- package/example/src/data/candlestick-data.json +0 -142
- package/example/src/data/candlestick-data2.json +0 -142
- package/example/src/data/line-data-non-linear-domain.json +0 -34
- package/example/src/data/line-data.json +0 -82
- package/example/src/data/line-data2.json +0 -82
- package/example/src/line-data-gh.json +0 -18
- package/example/tsconfig.json +0 -6
- package/example/webpack.config.js +0 -25
- package/example/yarn.lock +0 -9306
- package/lib/commonjs/charts/candle/HoverTrap/index.web.js +0 -106
- package/lib/commonjs/charts/candle/HoverTrap/index.web.js.map +0 -1
- package/lib/commonjs/charts/candle/utils.js +0 -50
- package/lib/commonjs/charts/candle/utils.js.map +0 -1
- package/lib/module/charts/candle/HoverTrap/index.web.js +0 -97
- package/lib/module/charts/candle/HoverTrap/index.web.js.map +0 -1
- package/lib/module/charts/candle/utils.js +0 -41
- package/lib/module/charts/candle/utils.js.map +0 -1
- package/lib/typescript/example/src/App.d.ts +0 -4
- package/lib/typescript/example/src/App.d.ts.map +0 -1
- package/lib/typescript/example/src/CandlestickChart.d.ts +0 -3
- package/lib/typescript/example/src/CandlestickChart.d.ts.map +0 -1
- package/lib/typescript/example/src/LineChart.d.ts +0 -3
- package/lib/typescript/example/src/LineChart.d.ts.map +0 -1
- package/lib/typescript/src/charts/candle/HoverTrap/index.web.d.ts +0 -3
- package/lib/typescript/src/charts/candle/HoverTrap/index.web.d.ts.map +0 -1
- package/lib/typescript/src/charts/candle/utils.d.ts +0 -18
- package/lib/typescript/src/charts/candle/utils.d.ts.map +0 -1
- package/scripts/bootstrap.js +0 -24
- package/src/charts/candle/HoverTrap/index.web.tsx +0 -109
- package/src/charts/candle/utils.ts +0 -56
- package/tsconfig.build.json +0 -5
- package/tsconfig.json +0 -28
- package/yarn.lock +0 -8529
package/example/package.json
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "react-native-wagmi-charts-example",
|
|
3
|
-
"description": "Example app for react-native-wagmi-charts",
|
|
4
|
-
"version": "0.0.1",
|
|
5
|
-
"private": true,
|
|
6
|
-
"main": "index",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"android": "npx expo start --android",
|
|
9
|
-
"ios": "npx expo start --ios",
|
|
10
|
-
"web": "npx expo start --web",
|
|
11
|
-
"start": "npx expo start",
|
|
12
|
-
"test": "jest",
|
|
13
|
-
"postinstall": "patch-package"
|
|
14
|
-
},
|
|
15
|
-
"dependencies": {
|
|
16
|
-
"@types/react": "~18.2.14",
|
|
17
|
-
"bumbag": "^2.2.1",
|
|
18
|
-
"bumbag-native": "^2.3.0",
|
|
19
|
-
"expo": "^49.0.0",
|
|
20
|
-
"expo-haptics": "~12.4.0",
|
|
21
|
-
"expo-splash-screen": "~0.20.5",
|
|
22
|
-
"react": "18.2.0",
|
|
23
|
-
"react-dom": "18.2.0",
|
|
24
|
-
"react-native": "0.72.3",
|
|
25
|
-
"react-native-gesture-handler": "~2.12.0",
|
|
26
|
-
"react-native-reanimated": "~3.3.0",
|
|
27
|
-
"react-native-svg": "13.9.0",
|
|
28
|
-
"react-native-web": "~0.19.6"
|
|
29
|
-
},
|
|
30
|
-
"devDependencies": {
|
|
31
|
-
"@babel/core": "^7.20.0",
|
|
32
|
-
"@babel/runtime": "^7.20.0",
|
|
33
|
-
"@expo/webpack-config": "^18.0.1",
|
|
34
|
-
"babel-loader": "^8.2.3",
|
|
35
|
-
"babel-plugin-module-resolver": "^4.1.0",
|
|
36
|
-
"babel-preset-expo": "^9.5.0",
|
|
37
|
-
"jsonfile": "^6.1.0",
|
|
38
|
-
"patch-package": "^6.4.7",
|
|
39
|
-
"postinstall-postinstall": "^2.1.0",
|
|
40
|
-
"typescript": "^5.1.3"
|
|
41
|
-
}
|
|
42
|
-
}
|
package/example/src/App.tsx
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import 'react-native-gesture-handler';
|
|
3
|
-
import {
|
|
4
|
-
Box,
|
|
5
|
-
Button,
|
|
6
|
-
Text,
|
|
7
|
-
Heading,
|
|
8
|
-
Level,
|
|
9
|
-
Provider as BumbagNativeProvider,
|
|
10
|
-
} from 'bumbag-native';
|
|
11
|
-
|
|
12
|
-
import CandlestickChart from './CandlestickChart';
|
|
13
|
-
import LineChart from './LineChart';
|
|
14
|
-
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
|
15
|
-
|
|
16
|
-
export default function App() {
|
|
17
|
-
const [selected, setSelected] = React.useState('');
|
|
18
|
-
return (
|
|
19
|
-
<GestureHandlerRootView style={{ flex: 1 }}>
|
|
20
|
-
<BumbagNativeProvider>
|
|
21
|
-
<Box.Safe flex="1">
|
|
22
|
-
<Level
|
|
23
|
-
verticalBelow=""
|
|
24
|
-
paddingX="major-2"
|
|
25
|
-
paddingY="major-2"
|
|
26
|
-
alignY="center"
|
|
27
|
-
>
|
|
28
|
-
<Heading.H5 key={'heading'}>
|
|
29
|
-
React Native WAGMI Charts 💸
|
|
30
|
-
</Heading.H5>
|
|
31
|
-
{selected ? (
|
|
32
|
-
<Button
|
|
33
|
-
size="small"
|
|
34
|
-
key="back-button"
|
|
35
|
-
onPress={() => setSelected('')}
|
|
36
|
-
>
|
|
37
|
-
Back
|
|
38
|
-
</Button>
|
|
39
|
-
) : null}
|
|
40
|
-
</Level>
|
|
41
|
-
<Box.Scroll>
|
|
42
|
-
{!selected && (
|
|
43
|
-
<Box paddingX="major-2" marginTop="major-6">
|
|
44
|
-
<Heading.H6 marginBottom="major-2">
|
|
45
|
-
Click a chart below to get started
|
|
46
|
-
</Heading.H6>
|
|
47
|
-
<Button onPress={() => setSelected('candlestick')}>
|
|
48
|
-
<Text>Candlestick</Text>
|
|
49
|
-
</Button>
|
|
50
|
-
<Button onPress={() => setSelected('line')}>
|
|
51
|
-
<Text>Line</Text>
|
|
52
|
-
</Button>
|
|
53
|
-
</Box>
|
|
54
|
-
)}
|
|
55
|
-
<Box marginTop="major-2">
|
|
56
|
-
{selected === 'candlestick' && <CandlestickChart />}
|
|
57
|
-
{selected === 'line' && <LineChart />}
|
|
58
|
-
</Box>
|
|
59
|
-
</Box.Scroll>
|
|
60
|
-
</Box.Safe>
|
|
61
|
-
</BumbagNativeProvider>
|
|
62
|
-
</GestureHandlerRootView>
|
|
63
|
-
);
|
|
64
|
-
}
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Platform } from 'react-native';
|
|
3
|
-
import { Box, Button, Flex, Heading, Text, Stack } from 'bumbag-native';
|
|
4
|
-
import { CandlestickChart, TCandle } from 'react-native-wagmi-charts';
|
|
5
|
-
import * as haptics from 'expo-haptics';
|
|
6
|
-
|
|
7
|
-
import mockData from './data/candlestick-data.json';
|
|
8
|
-
import mockData2 from './data/candlestick-data2.json';
|
|
9
|
-
|
|
10
|
-
function invokeHaptic() {
|
|
11
|
-
if (['ios', 'android'].includes(Platform.OS)) {
|
|
12
|
-
haptics.impactAsync(haptics.ImpactFeedbackStyle.Light);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export default function App() {
|
|
17
|
-
const [data, setData] = React.useState<TCandle[]>(mockData);
|
|
18
|
-
|
|
19
|
-
return (
|
|
20
|
-
<>
|
|
21
|
-
<Heading.H5 paddingX="major-2" marginBottom="major-2">
|
|
22
|
-
Candlestick Chart 🕯
|
|
23
|
-
</Heading.H5>
|
|
24
|
-
<CandlestickChart.Provider data={data}>
|
|
25
|
-
<CandlestickChart>
|
|
26
|
-
<CandlestickChart.Candles />
|
|
27
|
-
<CandlestickChart.Crosshair onCurrentXChange={invokeHaptic}>
|
|
28
|
-
<CandlestickChart.Tooltip />
|
|
29
|
-
</CandlestickChart.Crosshair>
|
|
30
|
-
</CandlestickChart>
|
|
31
|
-
<Heading.H6>Load Data</Heading.H6>
|
|
32
|
-
<Box marginTop="major-2">
|
|
33
|
-
<Flex flexWrap={'wrap'}>
|
|
34
|
-
<Button onPress={() => setData(mockData)}>candlestick-data</Button>
|
|
35
|
-
<Button onPress={() => setData(mockData2)}>
|
|
36
|
-
candlestick-data2
|
|
37
|
-
</Button>
|
|
38
|
-
</Flex>
|
|
39
|
-
</Box>
|
|
40
|
-
<Stack padding="major-2" spacing="major-1">
|
|
41
|
-
<Heading.H6>PriceText</Heading.H6>
|
|
42
|
-
<Box>
|
|
43
|
-
<Text fontWeight="500">Formatted: </Text>
|
|
44
|
-
<Flex>
|
|
45
|
-
<Box flex="1">
|
|
46
|
-
<Text fontSize="100">Current</Text>
|
|
47
|
-
<CandlestickChart.PriceText />
|
|
48
|
-
</Box>
|
|
49
|
-
<Box flex="1">
|
|
50
|
-
<Text fontSize="100">Open</Text>
|
|
51
|
-
<CandlestickChart.PriceText type="open" />
|
|
52
|
-
</Box>
|
|
53
|
-
<Box flex="1">
|
|
54
|
-
<Text fontSize="100">High</Text>
|
|
55
|
-
<CandlestickChart.PriceText type="high" />
|
|
56
|
-
</Box>
|
|
57
|
-
<Box flex="1">
|
|
58
|
-
<Text fontSize="100">Low</Text>
|
|
59
|
-
<CandlestickChart.PriceText type="low" />
|
|
60
|
-
</Box>
|
|
61
|
-
<Box flex="1">
|
|
62
|
-
<Text fontSize="100">Close</Text>
|
|
63
|
-
<CandlestickChart.PriceText type="close" />
|
|
64
|
-
</Box>
|
|
65
|
-
</Flex>
|
|
66
|
-
</Box>
|
|
67
|
-
<Box>
|
|
68
|
-
<Text fontWeight="500">Value: </Text>
|
|
69
|
-
<Flex>
|
|
70
|
-
<Box flex="1">
|
|
71
|
-
<Text fontSize="100">Current</Text>
|
|
72
|
-
<CandlestickChart.PriceText variant="value" />
|
|
73
|
-
</Box>
|
|
74
|
-
<Box flex="1">
|
|
75
|
-
<Text fontSize="100">Open</Text>
|
|
76
|
-
<CandlestickChart.PriceText type="open" variant="value" />
|
|
77
|
-
</Box>
|
|
78
|
-
<Box flex="1">
|
|
79
|
-
<Text fontSize="100">High</Text>
|
|
80
|
-
<CandlestickChart.PriceText type="high" variant="value" />
|
|
81
|
-
</Box>
|
|
82
|
-
<Box flex="1">
|
|
83
|
-
<Text fontSize="100">Low</Text>
|
|
84
|
-
<CandlestickChart.PriceText type="low" variant="value" />
|
|
85
|
-
</Box>
|
|
86
|
-
<Box flex="1">
|
|
87
|
-
<Text fontSize="100">Close</Text>
|
|
88
|
-
<CandlestickChart.PriceText type="close" variant="value" />
|
|
89
|
-
</Box>
|
|
90
|
-
</Flex>
|
|
91
|
-
</Box>
|
|
92
|
-
<Box>
|
|
93
|
-
<Text fontWeight="500">Custom format: </Text>
|
|
94
|
-
<Flex>
|
|
95
|
-
<Box flex="1">
|
|
96
|
-
<Text fontSize="100">Current</Text>
|
|
97
|
-
<CandlestickChart.PriceText
|
|
98
|
-
format={(d) => {
|
|
99
|
-
'worklet';
|
|
100
|
-
return `$${d.formatted} AUD`;
|
|
101
|
-
}}
|
|
102
|
-
/>
|
|
103
|
-
</Box>
|
|
104
|
-
<Box flex="1">
|
|
105
|
-
<Text fontSize="100">Open</Text>
|
|
106
|
-
<CandlestickChart.PriceText
|
|
107
|
-
type="open"
|
|
108
|
-
format={(d) => {
|
|
109
|
-
'worklet';
|
|
110
|
-
return `$${d.formatted} AUD`;
|
|
111
|
-
}}
|
|
112
|
-
/>
|
|
113
|
-
</Box>
|
|
114
|
-
<Box flex="1">
|
|
115
|
-
<Text fontSize="100">Close</Text>
|
|
116
|
-
<CandlestickChart.PriceText
|
|
117
|
-
type="close"
|
|
118
|
-
format={(d) => {
|
|
119
|
-
'worklet';
|
|
120
|
-
return `$${d.formatted} AUD`;
|
|
121
|
-
}}
|
|
122
|
-
/>
|
|
123
|
-
</Box>
|
|
124
|
-
</Flex>
|
|
125
|
-
</Box>
|
|
126
|
-
</Stack>
|
|
127
|
-
<Stack padding="major-2" spacing="minor-1">
|
|
128
|
-
<Heading.H6>DatetimeText</Heading.H6>
|
|
129
|
-
<Flex>
|
|
130
|
-
<Text fontWeight="500">Formatted: </Text>
|
|
131
|
-
<CandlestickChart.DatetimeText />
|
|
132
|
-
</Flex>
|
|
133
|
-
<Flex>
|
|
134
|
-
<Text fontWeight="500">Float: </Text>
|
|
135
|
-
<CandlestickChart.DatetimeText variant="value" />
|
|
136
|
-
</Flex>
|
|
137
|
-
<Flex>
|
|
138
|
-
<Text fontWeight="500">Custom format: </Text>
|
|
139
|
-
<CandlestickChart.DatetimeText
|
|
140
|
-
locale="en-AU"
|
|
141
|
-
options={{
|
|
142
|
-
year: 'numeric',
|
|
143
|
-
month: 'numeric',
|
|
144
|
-
day: 'numeric',
|
|
145
|
-
hour: 'numeric',
|
|
146
|
-
minute: 'numeric',
|
|
147
|
-
second: 'numeric',
|
|
148
|
-
}}
|
|
149
|
-
/>
|
|
150
|
-
</Flex>
|
|
151
|
-
</Stack>
|
|
152
|
-
</CandlestickChart.Provider>
|
|
153
|
-
</>
|
|
154
|
-
);
|
|
155
|
-
}
|
|
@@ -1,268 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as haptics from 'expo-haptics';
|
|
3
|
-
|
|
4
|
-
import { Box, Button, Flex, Heading, Stack, Text } from 'bumbag-native';
|
|
5
|
-
import {
|
|
6
|
-
LineChart,
|
|
7
|
-
TLineChartDataProp,
|
|
8
|
-
TLineChartPoint,
|
|
9
|
-
} from 'react-native-wagmi-charts';
|
|
10
|
-
|
|
11
|
-
import { Platform } from 'react-native';
|
|
12
|
-
import mockData from './data/line-data.json';
|
|
13
|
-
import mockData2 from './data/line-data2.json';
|
|
14
|
-
import mockDataNonLinear from './data/line-data-non-linear-domain.json';
|
|
15
|
-
import { useMemo } from 'react';
|
|
16
|
-
|
|
17
|
-
function invokeHaptic() {
|
|
18
|
-
if (['ios', 'android'].includes(Platform.OS)) {
|
|
19
|
-
haptics.impactAsync(haptics.ImpactFeedbackStyle.Light);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export default function App() {
|
|
24
|
-
const [data, setData] = React.useState<TLineChartPoint[]>(mockData);
|
|
25
|
-
const [multiData, toggleMultiData] = React.useReducer(
|
|
26
|
-
(state) => !state,
|
|
27
|
-
false
|
|
28
|
-
);
|
|
29
|
-
const [partialDay, togglePartialDay] = React.useReducer(
|
|
30
|
-
(state) => !state,
|
|
31
|
-
false
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
const [scaleRelativeToTime, setScaleRelativeToTime] = React.useState(false);
|
|
35
|
-
|
|
36
|
-
const [yRange, setYRange] = React.useState<undefined | 'low' | 'high'>(
|
|
37
|
-
undefined
|
|
38
|
-
);
|
|
39
|
-
|
|
40
|
-
const toggleYRange = () => {
|
|
41
|
-
setYRange((domain) => {
|
|
42
|
-
if (!domain) {
|
|
43
|
-
return 'low';
|
|
44
|
-
}
|
|
45
|
-
if (domain === 'low') {
|
|
46
|
-
return 'high';
|
|
47
|
-
}
|
|
48
|
-
return undefined;
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
const [toggleMinMaxLabels, setToggleMinMaxLabels] = React.useState(false);
|
|
53
|
-
const [toggleSnapToPoint, setToggleSnapToPoint] = React.useState(false);
|
|
54
|
-
const [toggleHighlight, setToggleHighlight] = React.useState(false);
|
|
55
|
-
|
|
56
|
-
let dataProp: TLineChartDataProp = data;
|
|
57
|
-
const [min, max] = useMemo(() => {
|
|
58
|
-
if (Array.isArray(dataProp)) {
|
|
59
|
-
const values = dataProp.map((d) => d.value);
|
|
60
|
-
const _min = Math.min(...values);
|
|
61
|
-
const _max = Math.max(...values);
|
|
62
|
-
return [
|
|
63
|
-
values.findIndex((v) => v === _min),
|
|
64
|
-
values.findIndex((v) => v === _max),
|
|
65
|
-
];
|
|
66
|
-
}
|
|
67
|
-
return [0, 0];
|
|
68
|
-
}, [dataProp]);
|
|
69
|
-
|
|
70
|
-
let chart = (
|
|
71
|
-
<LineChart>
|
|
72
|
-
<LineChart.Path color="black">
|
|
73
|
-
{toggleMinMaxLabels && (
|
|
74
|
-
<>
|
|
75
|
-
<LineChart.Gradient color="black" />
|
|
76
|
-
<LineChart.Tooltip position="top" at={max} />
|
|
77
|
-
<LineChart.Tooltip position="bottom" at={min} yGutter={-10} />
|
|
78
|
-
</>
|
|
79
|
-
)}
|
|
80
|
-
{toggleHighlight && (
|
|
81
|
-
<LineChart.Highlight
|
|
82
|
-
color="red"
|
|
83
|
-
from={Math.floor(data.length / 3)}
|
|
84
|
-
to={Math.floor(data.length * (2/3))}
|
|
85
|
-
/>
|
|
86
|
-
)}
|
|
87
|
-
</LineChart.Path>
|
|
88
|
-
<LineChart.CursorCrosshair
|
|
89
|
-
snapToPoint={toggleSnapToPoint}
|
|
90
|
-
onActivated={invokeHaptic}
|
|
91
|
-
onEnded={invokeHaptic}
|
|
92
|
-
>
|
|
93
|
-
<LineChart.Tooltip position="top" />
|
|
94
|
-
<LineChart.HoverTrap />
|
|
95
|
-
</LineChart.CursorCrosshair>
|
|
96
|
-
</LineChart>
|
|
97
|
-
);
|
|
98
|
-
|
|
99
|
-
if (multiData) {
|
|
100
|
-
dataProp = {
|
|
101
|
-
one: mockData,
|
|
102
|
-
two: mockData2,
|
|
103
|
-
};
|
|
104
|
-
chart = (
|
|
105
|
-
<LineChart.Group>
|
|
106
|
-
<LineChart id="one">
|
|
107
|
-
<LineChart.Path animateOnMount="foreground" color="blue" />
|
|
108
|
-
<LineChart.CursorCrosshair
|
|
109
|
-
snapToPoint={toggleSnapToPoint}
|
|
110
|
-
onActivated={invokeHaptic}
|
|
111
|
-
onEnded={invokeHaptic}
|
|
112
|
-
>
|
|
113
|
-
<LineChart.Tooltip />
|
|
114
|
-
</LineChart.CursorCrosshair>
|
|
115
|
-
</LineChart>
|
|
116
|
-
<LineChart id="two">
|
|
117
|
-
<LineChart.Path color="red">
|
|
118
|
-
<LineChart.Gradient color="black" />
|
|
119
|
-
<LineChart.HorizontalLine at={{ index: 4 }} />
|
|
120
|
-
</LineChart.Path>
|
|
121
|
-
<LineChart.CursorCrosshair
|
|
122
|
-
snapToPoint={toggleSnapToPoint}
|
|
123
|
-
color="hotpink"
|
|
124
|
-
onActivated={invokeHaptic}
|
|
125
|
-
onEnded={invokeHaptic}
|
|
126
|
-
>
|
|
127
|
-
<LineChart.Tooltip />
|
|
128
|
-
</LineChart.CursorCrosshair>
|
|
129
|
-
</LineChart>
|
|
130
|
-
</LineChart.Group>
|
|
131
|
-
);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
return (
|
|
135
|
-
<>
|
|
136
|
-
<Heading.H5 paddingX="major-2" marginBottom="major-2">
|
|
137
|
-
Line Chart 📈
|
|
138
|
-
</Heading.H5>
|
|
139
|
-
<LineChart.Provider
|
|
140
|
-
xDomain={
|
|
141
|
-
scaleRelativeToTime
|
|
142
|
-
? [data[0].timestamp, data[data.length - 1].timestamp]
|
|
143
|
-
: undefined
|
|
144
|
-
}
|
|
145
|
-
xLength={partialDay ? data.length * 2 : undefined}
|
|
146
|
-
yRange={{
|
|
147
|
-
min:
|
|
148
|
-
yRange === 'low'
|
|
149
|
-
? Math.min(...data.map((d) => d.value)) / 1.1
|
|
150
|
-
: undefined,
|
|
151
|
-
max:
|
|
152
|
-
yRange === 'high'
|
|
153
|
-
? Math.max(...data.map((d) => d.value)) * 1.1
|
|
154
|
-
: undefined,
|
|
155
|
-
}}
|
|
156
|
-
data={dataProp}
|
|
157
|
-
>
|
|
158
|
-
{chart}
|
|
159
|
-
<Box marginX="major-2" marginTop="major-2">
|
|
160
|
-
<Heading.H6 marginBottom={'major-2'}>Load Data</Heading.H6>
|
|
161
|
-
<Flex flexWrap={'wrap'}>
|
|
162
|
-
<Button onPress={() => setData(mockData)}>Data 1</Button>
|
|
163
|
-
<Button onPress={() => setData(mockData2)}>Data 2</Button>
|
|
164
|
-
<Button onPress={() => setData(mockDataNonLinear)}>Data 3</Button>
|
|
165
|
-
<Button onPress={() => setData([...mockData, ...mockData2])}>
|
|
166
|
-
Data 1 + Data 2
|
|
167
|
-
</Button>
|
|
168
|
-
<Button onPress={() => setData([...mockData2, ...mockData])}>
|
|
169
|
-
Data 2 + Data 1
|
|
170
|
-
</Button>
|
|
171
|
-
<Button
|
|
172
|
-
onPress={() => setData([...mockData2, ...mockData, ...mockData2])}
|
|
173
|
-
>
|
|
174
|
-
Data 2 + Data 1 + Data 2
|
|
175
|
-
</Button>
|
|
176
|
-
<Button
|
|
177
|
-
onPress={() =>
|
|
178
|
-
setData([
|
|
179
|
-
...mockData2,
|
|
180
|
-
...mockData,
|
|
181
|
-
...mockData2,
|
|
182
|
-
...mockData,
|
|
183
|
-
...mockData,
|
|
184
|
-
...mockData2,
|
|
185
|
-
...mockData2,
|
|
186
|
-
...mockData,
|
|
187
|
-
...mockData2,
|
|
188
|
-
...mockData,
|
|
189
|
-
...mockData,
|
|
190
|
-
...mockData2,
|
|
191
|
-
])
|
|
192
|
-
}
|
|
193
|
-
>
|
|
194
|
-
V large data
|
|
195
|
-
</Button>
|
|
196
|
-
<Button onPress={toggleYRange}>
|
|
197
|
-
{`${yRange || 'Set'} Y Domain`}
|
|
198
|
-
</Button>
|
|
199
|
-
<Button onPress={toggleMultiData}>{`Multi Data`}</Button>
|
|
200
|
-
<Button onPress={togglePartialDay}>{`Partial Day`}</Button>
|
|
201
|
-
<Button onPress={() => setToggleHighlight((val) => !val)}>
|
|
202
|
-
Toggle highlight
|
|
203
|
-
</Button>
|
|
204
|
-
<Button
|
|
205
|
-
onPress={() => setToggleMinMaxLabels((p) => !p)}
|
|
206
|
-
>{`Toggle min/max labels`}</Button>
|
|
207
|
-
<Button
|
|
208
|
-
onPress={() => {
|
|
209
|
-
// Use with data 3 for best demonstration
|
|
210
|
-
setScaleRelativeToTime((val) => !val);
|
|
211
|
-
}}
|
|
212
|
-
>
|
|
213
|
-
{`Toggle ${scaleRelativeToTime ? 'off' : 'on'} XDomain`}
|
|
214
|
-
</Button>
|
|
215
|
-
<Button
|
|
216
|
-
onPress={() => setToggleSnapToPoint((val) => !val)}
|
|
217
|
-
>{`Toggle Snap ${toggleSnapToPoint ? 'Off' : 'On'}`}</Button>
|
|
218
|
-
</Flex>
|
|
219
|
-
</Box>
|
|
220
|
-
{!multiData && (
|
|
221
|
-
<Stack padding="major-2" spacing="major-1">
|
|
222
|
-
<Heading.H6>PriceText</Heading.H6>
|
|
223
|
-
<Flex>
|
|
224
|
-
<Text fontWeight="500">Formatted: </Text>
|
|
225
|
-
<LineChart.PriceText />
|
|
226
|
-
</Flex>
|
|
227
|
-
<Flex>
|
|
228
|
-
<Text fontWeight="500">Value: </Text>
|
|
229
|
-
<LineChart.PriceText variant="value" />
|
|
230
|
-
</Flex>
|
|
231
|
-
<Flex>
|
|
232
|
-
<Text fontWeight="500">Custom format: </Text>
|
|
233
|
-
<LineChart.PriceText
|
|
234
|
-
format={(d) => {
|
|
235
|
-
'worklet';
|
|
236
|
-
return d.formatted ? `$${d.formatted} AUD` : '';
|
|
237
|
-
}}
|
|
238
|
-
/>
|
|
239
|
-
</Flex>
|
|
240
|
-
<Heading.H6>DatetimeText</Heading.H6>
|
|
241
|
-
<Flex>
|
|
242
|
-
<Text fontWeight="500">Formatted: </Text>
|
|
243
|
-
<LineChart.DatetimeText />
|
|
244
|
-
</Flex>
|
|
245
|
-
<Flex>
|
|
246
|
-
<Text fontWeight="500">Value: </Text>
|
|
247
|
-
<LineChart.DatetimeText variant="value" />
|
|
248
|
-
</Flex>
|
|
249
|
-
<Flex>
|
|
250
|
-
<Text fontWeight="500">Custom format: </Text>
|
|
251
|
-
<LineChart.DatetimeText
|
|
252
|
-
locale="en-AU"
|
|
253
|
-
options={{
|
|
254
|
-
year: 'numeric',
|
|
255
|
-
month: 'numeric',
|
|
256
|
-
day: 'numeric',
|
|
257
|
-
hour: 'numeric',
|
|
258
|
-
minute: 'numeric',
|
|
259
|
-
second: 'numeric',
|
|
260
|
-
}}
|
|
261
|
-
/>
|
|
262
|
-
</Flex>
|
|
263
|
-
</Stack>
|
|
264
|
-
)}
|
|
265
|
-
</LineChart.Provider>
|
|
266
|
-
</>
|
|
267
|
-
);
|
|
268
|
-
}
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"timestamp": 1625945400000,
|
|
4
|
-
"open": 33575.25,
|
|
5
|
-
"high": 33600.52,
|
|
6
|
-
"low": 33475.12,
|
|
7
|
-
"close": 33520.11
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
"timestamp": 1625946300000,
|
|
11
|
-
"open": 33545.25,
|
|
12
|
-
"high": 33560.52,
|
|
13
|
-
"low": 33510.12,
|
|
14
|
-
"close": 33520.11
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"timestamp": 1625947200000,
|
|
18
|
-
"open": 33510.25,
|
|
19
|
-
"high": 33515.52,
|
|
20
|
-
"low": 33250.12,
|
|
21
|
-
"close": 33250.11
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"timestamp": 1625948100000,
|
|
25
|
-
"open": 33215.25,
|
|
26
|
-
"high": 33430.52,
|
|
27
|
-
"low": 33215.12,
|
|
28
|
-
"close": 33420.11
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"timestamp": 1625949000000,
|
|
32
|
-
"open": 33445.25,
|
|
33
|
-
"high": 33520.52,
|
|
34
|
-
"low": 33415.12,
|
|
35
|
-
"close": 33440.11
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"timestamp": 1625949900000,
|
|
39
|
-
"open": 33435.25,
|
|
40
|
-
"high": 33465.52,
|
|
41
|
-
"low": 33435.12,
|
|
42
|
-
"close": 33455.11
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"timestamp": 1625950800000,
|
|
46
|
-
"open": 33480.25,
|
|
47
|
-
"high": 33480.52,
|
|
48
|
-
"low": 33430.12,
|
|
49
|
-
"close": 33445.11
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"timestamp": 1625951700000,
|
|
53
|
-
"open": 33440.25,
|
|
54
|
-
"high": 33545.52,
|
|
55
|
-
"low": 33440.12,
|
|
56
|
-
"close": 33510.11
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"timestamp": 1625952600000,
|
|
60
|
-
"open": 33485.25,
|
|
61
|
-
"high": 33520.52,
|
|
62
|
-
"low": 33460.12,
|
|
63
|
-
"close": 33515.11
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"timestamp": 1625953500000,
|
|
67
|
-
"open": 33515.25,
|
|
68
|
-
"high": 33550.52,
|
|
69
|
-
"low": 33515.12,
|
|
70
|
-
"close": 33540.11
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"timestamp": 1625954400000,
|
|
74
|
-
"open": 33570.25,
|
|
75
|
-
"high": 33645.52,
|
|
76
|
-
"low": 33545.12,
|
|
77
|
-
"close": 33645.11
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"timestamp": 1625955300000,
|
|
81
|
-
"open": 33640.25,
|
|
82
|
-
"high": 33665.52,
|
|
83
|
-
"low": 33600.12,
|
|
84
|
-
"close": 33630.11
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
"timestamp": 1625956200000,
|
|
88
|
-
"open": 33645.25,
|
|
89
|
-
"high": 33670.52,
|
|
90
|
-
"low": 33645.12,
|
|
91
|
-
"close": 33660.11
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
"timestamp": 1625957100000,
|
|
95
|
-
"open": 33670.25,
|
|
96
|
-
"high": 33785.52,
|
|
97
|
-
"low": 33660.12,
|
|
98
|
-
"close": 33745.11
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
"timestamp": 1625958000000,
|
|
102
|
-
"open": 33740.25,
|
|
103
|
-
"high": 33780.52,
|
|
104
|
-
"low": 33710.12,
|
|
105
|
-
"close": 33780.11
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"timestamp": 1625958900000,
|
|
109
|
-
"open": 33770.25,
|
|
110
|
-
"high": 33770.52,
|
|
111
|
-
"low": 33710.12,
|
|
112
|
-
"close": 33710.11
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
"timestamp": 1625959800000,
|
|
116
|
-
"open": 33705.25,
|
|
117
|
-
"high": 33760.52,
|
|
118
|
-
"low": 33705.12,
|
|
119
|
-
"close": 33750.11
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
"timestamp": 1625960700000,
|
|
123
|
-
"open": 33760.25,
|
|
124
|
-
"high": 33785.52,
|
|
125
|
-
"low": 33645.12,
|
|
126
|
-
"close": 33650.11
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
"timestamp": 1625961600000,
|
|
130
|
-
"open": 33670.25,
|
|
131
|
-
"high": 33835.52,
|
|
132
|
-
"low": 33635.12,
|
|
133
|
-
"close": 33825.11
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
"timestamp": 1625962500000,
|
|
137
|
-
"open": 33870.25,
|
|
138
|
-
"high": 33930.52,
|
|
139
|
-
"low": 33715.12,
|
|
140
|
-
"close": 33770.11
|
|
141
|
-
}
|
|
142
|
-
]
|