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

New animations only are correct for data aligned left #83

Closed
bcurley2314 opened this issue Oct 7, 2019 · 7 comments
Closed

New animations only are correct for data aligned left #83

bcurley2314 opened this issue Oct 7, 2019 · 7 comments
Labels
bug Something isn't working

Comments

@bcurley2314
Copy link

The new animations are great, however they only look correct for data that is static on the left side of the chart (beginning of the List<>). I'm currently using fl_charts for data that is over time (i.e. - the most recent data point is on the furthest right point). When I change time frames (by adding more points, "older" points to left beginning of the list (left), the animation starts over from the left and stretches out again, where I'd like to animation to "pin" on the right, and add data to the left and animate out.

I've attached a slowed down version of my issue to show what I'm talking about. Ideally, I believe the animation should have an alignment, allowing for the user to choose how to animate new data points in/out of the chart.

ezgif com-video-to-gif

@imaNNeo
Copy link
Owner

imaNNeo commented Oct 7, 2019

Hi,
May I ask you to give me a sample to reproduce it?
I think I know the problem, but I want to know your exact concern.

@imaNNeo imaNNeo added the bug Something isn't working label Oct 7, 2019
@bcurley2314
Copy link
Author

I don't have a quick sample at the moment, but if you simply change the maxX value (and have corresponding Y values to load) and watch the animation, you'll see it animates from the bottom Left position, which works well for some instances where you have a 0,0 graph, however mine is a timeline chart

@imaNNeo
Copy link
Owner

imaNNeo commented Oct 7, 2019

If you just update the maxX, I think there shouldn't be any problem (may I ask you to test it?),
I think the problem is adding new spots, or removing them.

@bcurley2314
Copy link
Author

yes that is exactly what the animation is showing above. I am adding and removing values to the X-axis when i tap last 5, last 10, etc. The problem isn't with updating the X values, it's the alignment of the animation (being bottom left, instead of bottom right)

@imaNNeo
Copy link
Owner

imaNNeo commented Oct 7, 2019

Got your problem, what if you update the minX manually?
It applies animation on the left side.

@bcurley2314
Copy link
Author

Correct it does. This seems like a hack as I'm having to convert the data from 0 - 29 (for a month view), to -29 - 0 in order to get the right side to stay stationary during the animation. With the maxY then changing as well, it just doesn't look right for my application at the moment. I'll close the bug as I don't believe this is a bug, but just a personal preference for my one case. Thanks for the prompt response!

@ManojMM026
Copy link

I have same case where animation doesn't look good.

fl_chart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants