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

Scale and displacement by code #527

Closed
mariovillamizar opened this issue Nov 2, 2015 · 3 comments
Closed

Scale and displacement by code #527

mariovillamizar opened this issue Nov 2, 2015 · 3 comments

Comments

@mariovillamizar
Copy link

Hi @danielgindi , thank you for this great library, it's amazing. I have a question. I have two charts, a chart below the other. I need to synchronize both charts. I mean, when a chart is displaced and/or scaled, the other chart should also do the same. It this possible? How can I do this?

@liuxuan30
Copy link
Member

Definitely it's possible, but this will requires some addtional understanding how the scale and scroll works.

There is a class called ChartViewPortHandler, and there are the methods you need to scale/scroll or even give your own matrix.

@mariovillamizar
Copy link
Author

Hi again @liuxuan30 and @danielgindi. I managed to synchronize zoom and scroll of both charts. Now the problem that I have is that the size of the charts changes when I zoom or scroll as the y-axis values change.

Example:

simulator screen shot nov 4 2015 11 29 11 am copy

I need to synchronize the size of chart too. I need that the size of both charts is always the same.

Example:

simulator screen shot nov 4 2015 11 29 27 am copy

@liuxuan30
Copy link
Member

1. the size of the charts changes when I zoom or scroll
the size of the chart is controlled by the frame, right? Have you change it? The zoom/scroll will never change the frame. Not sure the meaning
2. as the y-axis values change.
the y-axis value will change, because you are zooming! Right? :)

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