Giter VIP home page Giter VIP logo

Comments (21)

yangfeihu avatar yangfeihu commented on May 15, 2024 2

问题已经解决,需要导入 MarkPointComponent 组件:
import { MarkPointComponent } from 'echarts/components';

from react-native-echarts.

moon-xt avatar moon-xt commented on May 15, 2024

xAxis axisLabel.fontSize 也不生效
image

from react-native-echarts.

iambool avatar iambool commented on May 15, 2024

Svg模式中,markPoint是支持的,参见下方截图;但是Svg中,xAxis.axisLabel.fontSize 的设置确实没有生效,这一点我们会改下,感谢反馈。以上两个点,Skia模式都是支持的,在问题未修复前,可考虑先使用Skia绘图
1681353946831
1681353989282

from react-native-echarts.

moon-xt avatar moon-xt commented on May 15, 2024

我这边模拟器,真机都无法显示markPoint,是什么版本啊 @iambool

from react-native-echarts.

iambool avatar iambool commented on May 15, 2024

我这边模拟器,真机都无法显示markPoint,是什么版本啊 @iambool

我使用了你上方贴的版本,机型是iphone8、华为Nova5Pro. 你使用的是什么机型呢,尽可能提供多点参数,我尝试复现看看

from react-native-echarts.

iambool avatar iambool commented on May 15, 2024

我的配置:
"@wuba/react-native-echarts": "1.0.0",
"echarts": "5.4.2",
"react-native-svg": "13.7.0",
"@shopify/react-native-skia": "^0.1.156",

from react-native-echarts.

moon-xt avatar moon-xt commented on May 15, 2024

我这边模拟器,真机都无法显示markPoint,是什么版本啊@iambool

我用了你上面贴的版本,机型是iphone8、华为Nova5Pro。你用的是什么机型呢,尽管可能提供多点参数,我试试复现看

image
真机是华为mate 30 pro

"react-native-svg": "^13.3.0"

from react-native-echarts.

moon-xt avatar moon-xt commented on May 15, 2024

import React, { useEffect, useRef } from 'react';
import { StyleSheet, Dimensions, View } from 'react-native';
import SvgChart, { SVGRenderer } from '@wuba/react-native-echarts/svgChart';
import * as echarts from 'echarts/core';
import { LineChart } from 'echarts/charts';
import { TitleComponent, TooltipComponent, GridComponent } from 'echarts/components';
import { options } from './config';

// register extensions
echarts.use([TitleComponent, TooltipComponent, GridComponent, SVGRenderer, LineChart]);

const { width } = Dimensions.get('screen');

function SvgComponent(props: { option: any }) {
const { option = {} } = props || {};
const svgRef = useRef(null);

useEffect(() => {
let chart: any;
if (svgRef.current) {
chart = echarts.init(svgRef.current, 'light', {
renderer: 'svg',
width: width - 68,
height: 180
});
chart.setOption(option);

  chart.on('click', function (params: any) {
    console.log('click params: ', params);
  });
}
return () => chart?.dispose();

}, [option]);

return <SvgChart ref={svgRef} />;
}

const SvgChartDemo: React.FC = props => {
return (<View style={styles.container}><SvgComponent option={options} /></View>);
};

const styles = StyleSheet.create({
container: { flex: 1, backgroundColor: '#fff' }
});

export default SvgChartDemo;

from react-native-echarts.

zhiqingchen avatar zhiqingchen commented on May 15, 2024

你使用的react-native-svg版本是多少?

yarn why react-native-svg

from react-native-echarts.

moon-xt avatar moon-xt commented on May 15, 2024

你使用的react-native-svg版本是多少?

yarn why react-native-svg

[email protected]

from react-native-echarts.

iambool avatar iambool commented on May 15, 2024

我用低版本的svg(13.3.0)可以复现上方的问题,所以,尝试高版本的svg看看

from react-native-echarts.

iambool avatar iambool commented on May 15, 2024

你使用的react-native-svg版本是多少?

yarn why react-native-svg

[email protected]

这个版本也出不来markpoint吗

from react-native-echarts.

moon-xt avatar moon-xt commented on May 15, 2024

你使用的react-native-svg版本是多少?

yarn why react-native-svg

[email protected]

这个版本也出不来markpoint吗

没有显示

from react-native-echarts.

moon-xt avatar moon-xt commented on May 15, 2024

[email protected] [email protected] 都试过了,都不显示markpoint

from react-native-echarts.

iambool avatar iambool commented on May 15, 2024

svg版本升级后,有没有重新编译原生APP呢;如果没有,重新打App包看看

from react-native-echarts.

moon-xt avatar moon-xt commented on May 15, 2024

svg版本升级后,有没有重新编译原生APP呢;如果没有,重新打App包看看

编译了,没显示, 跟rn版本有关系?
[email protected]
yarn
cd ios
pod install
xcode 重新运行安装到模拟器
android用真机重新安装的

from react-native-echarts.

moon-xt avatar moon-xt commented on May 15, 2024

image

from react-native-echarts.

iambool avatar iambool commented on May 15, 2024

我这边目前是 "react-native": "^0.70.5"
我试试看0.69

from react-native-echarts.

iambool avatar iambool commented on May 15, 2024

svg版本升级后,有没有重新编译原生APP呢;如果没有,重新打App包看看

编译了,没显示, 跟rn版本有关系? [email protected] yarn cd ios pod install xcode 重新运行安装到模拟器 android用真机重新安装的

我尝试了0.69.7,svg用的13.7.0,markpoint也是能出来的;你那边有进展吗

from react-native-echarts.

moon-xt avatar moon-xt commented on May 15, 2024

svg版本升级后,有没有重新编译原生APP呢;如果没有,重新打App包看看

编译了,没显示, 跟rn版本有关系? [email protected] yarn cd ios pod install xcode 重新运行安装到模拟器 android用真机重新安装的

我尝试了0.69.7,svg用的13.7.0,markpoint也是能出来的;你那边有进展吗

不显示,还没来得及看。。

from react-native-echarts.

yangfeihu avatar yangfeihu commented on May 15, 2024

"react-native": "^0.71.6",
"react-native-svg": "^13.9.0",
"@shopify/react-native-skia": "^0.1.197",
"@wuba/react-native-echarts": "^1.2.1",

我这边的markPoint也显示不了,能不能把这个问题修复下

from react-native-echarts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.