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

isAnimated on bar chart animates from the wrong direction #868

Open
jcseo3 opened this issue Oct 12, 2024 · 1 comment
Open

isAnimated on bar chart animates from the wrong direction #868

jcseo3 opened this issue Oct 12, 2024 · 1 comment

Comments

@jcseo3
Copy link

jcseo3 commented Oct 12, 2024

Description

Simulator.Screen.Recording.-.iPhone.13.mini.-.2024-10-12.at.12.12.03.mp4

I have a bar chart component on which I have set the isAnimated prop to be true. When I do this, it seems like on initial render the chart animates as expected (from the y = 0 point of the axis), but on data change, it animates from all different directions. I don't believe we had this issue when using version ^1.4.10 but seems to have broken at some point after.

(as far as I can tell, animation works as expected up to version 1.4.30 of the package)

Thank you for your attention to this matter!

Steps to reproduce

here are the bar chart component props I am using

<BarChart
          yAxisTextStyle={...}
          data={chartData}
          height={125}
          barBorderRadius={2}
          disableScroll
          spacing={5}
          isAnimated={true}
          onPress={(_item, index) => {
          ...
            setSelectedWeekIndex(index);
          }}
          yAxisThickness={0}
          formatYLabel={(label) => {...}
          yAxisSide={yAxisSides.RIGHT}
          roundToDigits
          noOfSections={2}
          hideRules
          referenceLinesOverChartContent={false}
          showReferenceLine1
          referenceLine1Position={maxVal / 2}
          referenceLine1Config={...}
          showReferenceLine2
          referenceLine2Position={maxVal}
          referenceLine2Config={...}
          scrollToEnd
          minHeight={5}
        />

Snack or a link to a repository

No response

version of react-native-gifted-charts

1.4.44

React Native version

0.73.6

Platforms

iOS

Workflow

React Native

@Abhinandan-Kushwaha
Copy link
Owner

Hi @jcseo3 👋
Can you share the data and the exact code you are using? Coz I am unable repro this issue in my local.

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