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

Zoom out when I update new data #454

Closed
1 task done
Seongkyun-Yu opened this issue Nov 8, 2020 · 3 comments
Closed
1 task done

Zoom out when I update new data #454

Seongkyun-Yu opened this issue Nov 8, 2020 · 3 comments

Comments

@Seongkyun-Yu
Copy link

Seongkyun-Yu commented Nov 8, 2020

  • question

What is the current behavior

Zoom out when I update new data

What is the expected behavior

Fix current Zooming

  • Version: 1.0.0-alpha.16
  • Browser: [all ]

Hi, I want create realtime chart, so I update chart data frequently

When I update new data(ex, 200 data -> 201 data), zoom setting is initialized

I want fix zoom setting that were previously changed by the user

I already try updating example
(https://github.com/reactivemarkets/react-financial-charts/blob/master/packages/stories/src/features/updating/BasicLineSeries.tsx)
(https://github.com/reactivemarkets/react-financial-charts/blob/master/packages/stories/src/data/withUpdatingData.tsx)

but this is not work my project

How can I do that?

@Seongkyun-Yu
Copy link
Author

Self-answering problem
fix xExtents value

@otaviobonder-deel
Copy link

Hi @Seongkyun-Yu, I'm trying to achieve the same.

How do you get the xExtents value from the zoom applied by the user?

@Seongkyun-Yu
Copy link
Author

@otaviobps

just fix xExtents value.

const xExtents = [min, max + 5] 

Even if data is added in real time, don't change min, max values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants