margelo / react-native-graph

📈 Beautiful, high-performance Graphs and Charts for React Native built with Skia

Home Page:https://margelo.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Graph opacity is faded when animated = True

nopshusang opened this issue · comments

Pretty basic setup. Pan gesture isn't enabled

<Box height={350}>
  <LineGraph
      style={styles.chart}
      points={dataPoints}
      color={colors[accentColorTheme]}
      lineThickness={2}
      animated={true}
    />
</Box>

When animated={true}
Screen Shot 2022-06-14 at 11 02 51 PM

When animated={false}
image

Facing the same issue. Did you find any solution to that?

Ah yes, that's a bug! Maybe #14 fixes this?

The solution above technically fixes it. However, it breaks the initial fingerX position after the hold. The right fix for it is to move the check into the setFingerX callback

pathEnd.current = isActive.value ? fingerX / width : 1

I recommend you revert that solution and put this one in instead