Skip to content

Pie chart flickers wrong color when changing selected section via focusOnPress #1148

@sam1463

Description

@sam1463

Description

When using the focusOnPress functionality for the pie chart, and then tapping on a non-focused section to focus it, the chart briefly changes two sections to the wrong color, and then corrects. It seems like this is a result of how it renders two pie charts to achieve the focused visual, and only renders the focused section in the second chart, with a radius offset to align with the focused section. There is some lag it seems, where

Steps to reproduce

  1. render a pie chart (donut or pie chart, doesn't matter)
  2. pass in these props:
focusedPieIndex={0}
focusOnPress
toggleFocusOnPress
  1. tap on different sections to change focus
  2. Notice that the chart visual change looks janky

Snack or a link to a repository

No response

version of react-native-gifted-charts

1.4.64

React Native version

0.76.9

Platforms

iOS

Workflow

React Native

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions