react-native-secharts icon indicating copy to clipboard operation
react-native-secharts copied to clipboard

在小米手机上显示有随机性,有时显示,有时不显示

Open shiguo2021 opened this issue 5 years ago • 3 comments

shiguo2021 avatar Aug 13 '20 10:08 shiguo2021

楼主解决了吗,碰到相同问题

Glorycsc avatar Aug 28 '20 03:08 Glorycsc

放弃了,没有解决。

2020年8月28日 上午11:23,Glorycsc [email protected] 写道:

楼主解决了吗,碰到相同问题

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/shifeng1993/react-native-secharts/issues/76#issuecomment-682303633, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD5MPSRZ2CNNV446VPXY3ETSC4PL3ANCNFSM4P6FMI6A.

shiguo2021 avatar Sep 20 '20 13:09 shiguo2021

我在华为手机上也遇到类似问题,我的粗暴解决办法是在组件componentDidMount这个生命周期中对图表reload一下。

import React, {Component} from 'react';
import {Echarts} from 'react-native-secharts';
class Secharts extends Component {
  constructor(props) {
    super(props);
    this.echartRef = React.createRef();
  }
  componentDidMount() {
    this.echartRef.current.chartRef.current.reload();
  }
  render() {
    return (
      <Echarts
        ref={this.echartRef}
        option={this.props.chartOption}
        height={120}
      />
    );
  }
}
export default Secharts;

wuchaoliang avatar Feb 03 '21 03:02 wuchaoliang