FormidableLabs / victory

A collection of composable React components for building interactive data visualizations
http://commerce.nearform.com/open-source/victory/
Other
10.97k stars 526 forks source link

The charts are crashed on victory-native V36+ #2649

Closed alexTamilouski closed 7 months ago

alexTamilouski commented 1 year ago

The charts are crashed during load.

Victory version The charts are crashed on version 36+ of victory-native. With the 35th all works fine.

This is my case of usage ` <VictoryChart theme={VictoryTheme.material} scale={{x: 'time'}} width={size?.width} height={size?.height} padding={{top: 0, bottom: 50, left: 50, right: 5}} domainPadding={{x: [10, 10], y: [50, 50]}} containerComponent={ <VictoryZoomContainer downsample={50} allowZoom={false} zoomDimension="x" zoomDomain={zoomDomain} onZoomDomainChange={onDomainChange} /> }>

        <VictoryAxis dependentAxis />

        <VictoryGroup color={color} data={data}>
          <VictoryLine interpolation="monotoneX" />
          <VictoryScatter size={3} labelComponent={<VictoryLabel backgroundPadding={3} />} />
        </VictoryGroup>

        {extraData?.length > 0 && (
          <VictoryGroup color={extraDataColor} data={extraData}>
            <VictoryLine interpolation="monotoneX" />
            <VictoryScatter size={3} labelComponent={<VictoryLabel backgroundPadding={3} />} />
          </VictoryGroup>
        )}
</VictoryChart>` 

Screenshots Screenshot 2023-09-12 at 14 34 03

Smartphone (please complete the following information): The issue is reproducible for IOS and Android.

Additional context "node": 16.13.2" {

"dependencies": { "@jitsi/logger": "2.0.0", "@microsoft/signalr": "6.0.6", "@react-native-async-storage/async-storage": "~1.17.11", "@react-native-camera-roll/camera-roll": "~5.1.0", "@react-native-clipboard/clipboard": "~1.11.1", "@react-native-community/blur": "~4.3.2", "@react-native-community/datetimepicker": "~6.7.0", "@react-native-community/geolocation": "~3.0.5", "@react-native-community/netinfo": "~9.3.6", "@react-native-community/progress-bar-android": "~1.0.5", "@react-native-community/progress-view": "~1.3.1", "@react-native-community/push-notification-ios": "~1.10.1", "@react-native-community/slider": "~4.4.2", "@react-native-firebase/analytics": "16.4.6", "@react-native-firebase/app": "16.4.6", "@react-native-firebase/crashlytics": "16.4.6", "@react-native-firebase/messaging": "16.4.6", "@react-native-firebase/remote-config": "16.4.6", "@react-navigation/bottom-tabs": "~6.5.2", "@react-navigation/drawer": "~6.5.6", "@react-navigation/material-top-tabs": "~6.5.1", "@react-navigation/native": "~6.1.1", "@react-navigation/stack": "~6.3.10", "@reduxjs/toolkit": "~1.4.0", "@storybook/addon-actions": "6.3.13", "@storybook/addon-controls": "6.3.13", "@storybook/addon-ondevice-actions": "6.0.1-beta.6", "@storybook/addon-ondevice-backgrounds": "6.0.1-beta.6", "@storybook/addon-ondevice-controls": "6.0.1-beta.6", "@storybook/addons": "6.3.13", "@storybook/react-native": "6.0.1-beta.6", "@webcomponents/url": "0.7.1", "@xmldom/xmldom": "0.7.5", "add": "~2.0.6", "axios": "1.2.2", "color": "~4.2.3", "deepmerge": "~3.2.0", "deprecated-react-native-prop-types": "~2.3.0", "formik": "~2.2.6", "jest-cli": "~24.5.0", "jquery": "3.5.1", "libphonenumber-js": "^1.10.15", "lodash": "~4.17.11", "lodash-inflection": "~1.5.0", "mem": "~9.0.2", "moment": "~2.29.1", "promise.allsettled": "1.0.4", "qrcode": "~1.4.4", "qs": "~6.11.0", "react": "18.2.0", "react-native": "0.71.10", "react-native-app-auth": "~6.4.3", "react-native-audio-recorder-player": "2.6.0", "react-native-blob-util": "~0.16.2", "react-native-calendars": "1.1268.0", "react-native-callstats": "~3.73.0", "react-native-device-info": "~7.3.1", "react-native-elements": "3.4.2", "react-native-fs": "~2.18.0", "react-native-gesture-handler": "2.10.0", "react-native-google-fit": "0.18.2", "react-native-hyperlink": "~0.0.18", "react-native-image-picker": "5.6.1", "react-native-inappbrowser-reborn": "3.4.0", "react-native-keep-awake": "~4.0.0", "react-native-keychain": "~8.1.1", "react-native-localize": "~1.3.1", "react-native-logs": "~4.0.1", "react-native-mail": "~6.1.1", "react-native-maps": "~1.4.0", "react-native-modal": "~13.0.1", "react-native-pager-view": "^6.1.2", "react-native-pdf": "~6.6.2", "react-native-performance": "2.0.0", "react-native-permissions": "~3.0.5", "react-native-push-notification": "7.4.0", "react-native-reanimated": "2.14.0", "react-native-redash": "^18.1.0", "react-native-render-html": "~4.2.0", "react-native-safe-area-context": "~3.3.2", "react-native-safe-area-view": "~1.1.1", "react-native-screens": "~3.18.2", "react-native-svg": "~13.13.0", "react-native-tab-view": "~3.3.4", "react-native-url-polyfill": "1.2.0", "react-native-vector-icons": "~9.2.0", "react-native-version-check": "~3.4.3", "react-native-video": "~5.2.1", "react-native-vision-camera": "2.15.4", "react-native-webview": "~11.23.0", "react-redux": "~8.0.2", "redux": "~4.2.0", "redux-logger": "~3.0.6", "redux-persist": "~6.0.0", "redux-persist-transform-filter": "~0.0.20", "redux-saga": "~1.1.3", "reselect": "~4.1.6", "rrule": "~2.6.8", "victory-native": "~35.5.3", "vision-camera-code-scanner": "~0.2.0", "xmldom": "~0.6.0", "yarn": "~1.22.11", "yup": "~0.29.1" }, "devDependencies": { "@babel/core": "~7.20.0", "@babel/preset-env": "~7.20.0", "@babel/preset-typescript": "~7.21.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/lodash": "~4.14.165", "@types/qrcode": "~1.3.5", "@types/react": "18.0.28", "@types/react-native": "0.70.13", "@types/react-native-keep-awake": "~2.0.2", "@types/react-native-push-notification": "~5.0.5", "@types/react-native-vector-icons": "~6.4.11", "@types/react-native-version-check": "~3.4.3", "@types/react-native-video": "~5.0.9", "@types/react-native-webrtc": "~1.75.5", "@types/react-redux": "~7.1.24", "@types/react-test-renderer": "~18.0.0", "@types/yup": "~0.29.9", "babel-jest": "^29.2.1", "eslint": "~8.19.0", "eslint-config-prettier": "~6.15.0", "eslint-plugin-ft-flow": "~2.0.3", "eslint-plugin-import": "~2.25.2", "eslint-plugin-jsdoc": "~4.4.3", "eslint-plugin-prettier": "~3.1.4", "jest": "^29.2.1", "jetifier": "~2.0.0", "metro-react-native-babel-preset": "0.73.9", "prettier": "2.4.1", "react-test-renderer": "18.2.0", "typescript": "~4.8.4" },

kevtronkrueger commented 11 months ago

We were (maybe still are) periodically experiencing the same crash on Android. We did not have crashes on iOS, but did consistently get the following logged warning: Warning: Failed prop type: Invalid propscalesupplied to 'VictoryChartImpl'

In our case, the origin of the problem seemed to be scale time. Transitioning to scale linear eliminated the warning on iOS. We haven't reproduced the crash on Android, but that doesn't mean it's fixed. So take this anecdote with a grain of salt.

carbonrobot commented 10 months ago

Hi everyone, we are transitioning all Native development to our new Victory Native XL library which is purpose built for supporting Native. Many of the design decisions we made in this version of Victory is not ideal for Native development.

carbonrobot commented 7 months ago

Please reopen if there are more questions or information.