You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
界面代码:
`import React, {useRef, useEffect} from 'react';
import * as echarts from 'echarts/core';
import {LineChart} from 'echarts/charts';
import {GridComponent} from 'echarts/components';
import {SVGRenderer, SvgChart} from '@wuba/react-native-echarts';
import {View, Text} from 'react-native';
{ "name": "reactNativeEchartsTest", "version": "0.0.1", "private": true, "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", "lint": "eslint .", "start": "react-native start", "test": "jest" }, "dependencies": { "@shopify/react-native-skia": "1.3.11", "@wuba/react-native-echarts": "2.0.0", "echarts": "^5.5.1", "react": "18.2.0", "react-native": "0.74.6", "react-native-gesture-handler": "^2.21.2", "react-native-svg": "^15.2.0" }, "devDependencies": { "@babel/core": "^7.20.0", "@babel/preset-env": "^7.20.0", "@babel/runtime": "^7.20.0", "@react-native-community/cli": "latest", "@react-native/babel-preset": "0.74.88", "@react-native/eslint-config": "0.74.88", "@react-native/metro-config": "0.74.88", "@react-native/typescript-config": "0.74.88", "@types/react": "^18.2.6", "@types/react-test-renderer": "^18.0.0", "babel-jest": "^29.6.3", "eslint": "^8.19.0", "jest": "^29.6.3", "prettier": "2.8.8", "react-test-renderer": "18.2.0", "typescript": "5.0.4" }, "engines": { "node": ">=18" } }
界面代码:
`import React, {useRef, useEffect} from 'react';
import * as echarts from 'echarts/core';
import {LineChart} from 'echarts/charts';
import {GridComponent} from 'echarts/components';
import {SVGRenderer, SvgChart} from '@wuba/react-native-echarts';
import {View, Text} from 'react-native';
echarts.use([SVGRenderer, LineChart, GridComponent]);
export default function App() {
const skiaRef = useRef(null);
useEffect(() => {
const option = {
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
},
yAxis: {
type: 'value',
},
series: [
{
data: [150, 230, 224, 218, 135, 147, 260],
type: 'line',
},
],
};
let chart;
if (skiaRef.current) {
chart = echarts.init(skiaRef.current, 'light', {
renderer: 'svg',
width: 400,
height: 400,
});
chart.setOption(option);
}
}, []);
return ;
}
`
无法显示图表 生产环境显示不了
The text was updated successfully, but these errors were encountered: