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

Keep position on rotation #824

Merged
merged 1 commit into from
Mar 11, 2016
Merged

Conversation

leoMehlig
Copy link
Contributor

I’ve added a flag (keepPositionOnRotation) to BarLineChartViewBase indicating whether the chart
should stay at its current position or not

The flag defaults to false to not change any existing behaviour.

This feature was requested/discussed in #786.

The result can be seen in the two picture pairs below:

keepPositionOnRotation = false (old behaviour):

simulator screen shot 10 mar 2016 11 03 26
simulator screen shot 10 mar 2016 11 03 31

keepPositionOnRotation = true:

simulator screen shot 10 mar 2016 11 04 29
simulator screen shot 10 mar 2016 11 04 33

I’ve added a flag to BarLineChartViewBase indicating whether the chart
should stay at its current position or not

The flag defaults to false to not change any existing behaviour.
@danielgindi
Copy link
Collaborator

This is a great feature!

I'll see how we can migrate this to the Android side and then merge. If you are working on this crossplatform and want to issue a PR there as well - please the PR from the other one so we can synchronize the merge.

@leoMehlig
Copy link
Contributor Author

@danielgindi I'm looking into it. Seems like the current behaviour is different. Android completely zooms out, while iOS keeps its scale.

@leoMehlig
Copy link
Contributor Author

Summited PR on MPAndroidChart

danielgindi added a commit that referenced this pull request Mar 11, 2016
@danielgindi danielgindi merged commit 2a64290 into ChartsOrg:master Mar 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants