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

animateOnDataChange does not work when yAxisOffset is set #853

Closed
csmartinsfct opened this issue Sep 25, 2024 · 1 comment
Closed

animateOnDataChange does not work when yAxisOffset is set #853

csmartinsfct opened this issue Sep 25, 2024 · 1 comment

Comments

@csmartinsfct
Copy link

csmartinsfct commented Sep 25, 2024

Description

animateOnDataChange does not work when yAxisOffset is set.

It works fine when yAxisOffset is not set but otherwise it does not work.

Steps to reproduce

You can reproduce using this code:

 <LineChart
    width={320}
    height={90}
    data={data}
    isAnimated
    thickness={3}
    adjustToWidth
    yAxisOffset={min}
    hideYAxisText
    animateOnDataChange
    hideDataPoints
    backgroundColor="transparent"
    rulesColor="transparent"
    rulesType="transparent"
    yAxisColor="transparent"
    xAxisColor="transparent"
    color="blue"
    trimYAxisAtTop
/>

This only animates on enter, if you update the data it does not animate between old and new data set. However, it does animate between old and new data set if you remove yAxisOffset. This happens when yAxisOffset > 0.

I would expect it to still be able to animate between the data sets, even with yAxisOffset defined. For now, I'm passing in a key so that it animates from scratch for every new data set, which isn't too bad but it would be preferred if it could animate the line like it does when we set animateOnDataChange.

Snack or a link to a repository

No response

version of react-native-gifted-charts

1.4.41

React Native version

0.73.4

Platforms

iOS

Workflow

React Native

@Abhinandan-Kushwaha
Copy link
Owner

Hi @csmartinsfct
Thanks for reporting this issue. It has been fixed from versions 1.4.42 onwards. 🎉

Please use the latest version of the library.

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

2 participants