Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PieChartPro饼图设置animated为true,动画会卡顿。 #9

Open
xuxiaoqian1 opened this issue Aug 9, 2024 · 0 comments
Open

PieChartPro饼图设置animated为true,动画会卡顿。 #9

xuxiaoqian1 opened this issue Aug 9, 2024 · 0 comments

Comments

@xuxiaoqian1
Copy link
Collaborator

xuxiaoqian1 commented Aug 9, 2024

描述 / Description

在harmonyOS Next中若直接使用原库,PieChartPro饼图设置animated为true,动画会卡顿。

根因分析:源码中useNativeDriver为true导致动画会卡顿,RN框架问题。
规避方案:源码中将useNativeDriver设置为false。

问题复现demo:

import { View } from 'react-native';
import { PieChartPro } from "react-native-gifted-charts";
const pieData = [
  { value: 54, color: '#177AD5', text: '54%' },
  { value: 30, color: '#79D2DE', text: '30%' },
  { value: 26, color: '#ED6665', text: '26%' },
]

export default function () {
  return (
    <>
      <View>
        <PieChartPro data={pieData} isAnimated={true}></PieChartPro>
      </View>
    </>
  )
}

复现步骤 / Steps to reproduce

No response

库版本 / Library version

1.4.16-0.0.1

React Native OpenHarmony version

0.72.28

构建类型 / Build type

Debug app & dev bundle

设备 / Device

Real device

设备版本 / Device model

Mate 60 pro(3.0.0.29)

已悉知 / Acknowledgements

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant