victory icon indicating copy to clipboard operation
victory copied to clipboard

VictoryArea flickering and showing decimal values in label

Open camilossantos2809 opened this issue 1 year ago • 2 comments

When VictoryArea is used with the animated parameter, the label is blinking and showing decimal values that are not present in data.

In the Expo Snack example, the simple function is used on labels to show the value of x. I assume it's because of the animated values, but as mentioned here #493, in my understanding the value used in data would be persisted.

Is there any workaround to resolve this?

react-native: 0.71.10 victory-native version: 36.6.8

  • https://snack.expo.dev/@camilossantos/victory-area-issue In the example I use this type of values for an animated object to facilitate the demonstration of the problem.
import { VictoryArea } from 'victory-native';

const sampleData = [
  { x: 1, y: 2, y0: 0 },
  { x: 2, y: 3, y0: 1 },
  { x: 3, y: 5, y0: 1 },
  { x: 4, y: 4, y0: 2 },
  { x: 5, y: 6, y0: 2 },
];

export default function App() {
  return (
    <VictoryArea
      data={sampleData}
      labels={({ datum }) => datum.x}
      animate={{
        duration: 10000,
        onLoad: { duration: 2000 },
      }}
    />
  );
}

camilossantos2809 avatar Jun 13 '23 20:06 camilossantos2809

Did you find any solution to this flickering ?

davortrifunov avatar Nov 16 '23 11:11 davortrifunov

Same thing happening here

Poli97 avatar Nov 16 '23 11:11 Poli97

Closing as duplicate of #1997

carbonrobot avatar Feb 23 '24 17:02 carbonrobot