Abhinandan-Kushwaha / react-native-gifted-charts

The most complete library for Bar, Line, Area, Pie, Donut, Stacked Bar and Population Pyramid charts in React Native. Allows 2D, 3D, gradient, animations and live data updates.
https://www.npmjs.com/package/react-native-gifted-charts
MIT License
792 stars 153 forks source link

PieChart data attribute setting also sets textColor: 'red', focused: true, the font does not display red #886

Open xuxiaoqian1 opened 3 weeks ago

xuxiaoqian1 commented 3 weeks ago

Description

PieChart data attribute setting also sets textColor: 'red', focused: true, the font does not display red

Problem reproduction demo:

<PieChart data={[{ value: 50 }, { value: 20 }, { value: 40 }]} {...{
      showText: true,
      showTextBackground: true,
      sectionAutoFocus: true,
      data: [
        { shiftTextX: 10, shiftTextY: 20, value: 60, text: '60', textColor: 'red', focused: true, },
        { value: 70, text: '70', textColor: 'blue', },
        { value: 40, text: '40', textColor: 'black', }
      ],
    }}></PieChart>

Steps to reproduce

Problem reproduction demo:

<PieChart data={[{ value: 50 }, { value: 20 }, { value: 40 }]} {...{
      showText: true,
      showTextBackground: true,
      sectionAutoFocus: true,
      data: [
        { shiftTextX: 10, shiftTextY: 20, value: 60, text: '60', textColor: 'red', focused: true, },
        { value: 70, text: '70', textColor: 'blue', },
        { value: 40, text: '40', textColor: 'black', }
      ],
    }}></PieChart>

Snack or a link to a repository

No response

version of react-native-gifted-charts

1.4.47

React Native version

0.72.5

Platforms

iOS

Workflow

React Native