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

Graph opacity is faded when animated = True #23

Closed
nopshusang opened this issue Jun 15, 2022 · 3 comments
Closed

Graph opacity is faded when animated = True #23

nopshusang opened this issue Jun 15, 2022 · 3 comments

Comments

@nopshusang
Copy link

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

@amansharma20
Copy link

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

@mrousavy
Copy link
Member

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

@nopshusang
Copy link
Author

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

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

3 participants