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

Multiple Chart View Within ScrollView #65

Closed
BurhanMughal opened this issue May 5, 2015 · 18 comments
Closed

Multiple Chart View Within ScrollView #65

BurhanMughal opened this issue May 5, 2015 · 18 comments

Comments

@BurhanMughal
Copy link

Hi Daniel,
I have another problem to cope with,
I have multiple charts to view in One ViewController Scene,

i - Pie Chart
ii - Scattered Chart
iii - Bar Chart

Problem is :

  • Start scrolling It works perfectly,
  • End scrolling and wait for 1-5 Seconds
  • Then start scrolling it will not scroll.

I think Chart view is eating scroll of My Scroll view, Or am I missing something ?

Thanks.

@danielgindi
Copy link
Collaborator

Well I can't see your code so I can't tell- but it CAN diaable your scroll
if it is zoomed in for example, ir if "default touches" are disabled.

‏בתאריך יום שלישי, 5 במאי 2015, BurhanMughal notifications@github.com כתב:

Hi Daniel,
I have another problem to cope with,
I have multiple charts to view in One ViewController Scene,

i - Pie Chart
ii - Scattered Chart
iii - Bar Chart

Problem is :

  • when I start scrolling It works perfectly,
  • But when I end scrolling and wait for 1-5 Seconds
  • Then I start scrolling but it didn't scroll.

I think Chart view is eating scroll of My Scroll view, Or am I missing
something ?

Thanks.


Reply to this email directly or view it on GitHub
#65.

@BurhanMughal
Copy link
Author

well Code is simple I just put chart views in a scroll view, and that's it.

@danielgindi
Copy link
Collaborator

Well I'm sure the code is simple, but every setup is different. So you can
either debug and tell us what's happening, or provide a sample code :-)

On Tue, May 5, 2015 at 12:17 PM, BurhanMughal notifications@github.com
wrote:

well Code is simple I just put chart views in a scroll view, and that's it.


Reply to this email directly or view it on GitHub
#65 (comment)
.

@BurhanMughal
Copy link
Author

How i can upload text file of my code ?

@danielgindi
Copy link
Collaborator

Just put a sample project on a git repo and send a link

On Tue, May 5, 2015 at 12:51 PM, BurhanMughal notifications@github.com
wrote:

How i can upload text file of my code ?


Reply to this email directly or view it on GitHub
#65 (comment)
.

@BurhanMughal
Copy link
Author

@BurhanMughal
Copy link
Author

Waiting for your response.

@danielgindi
Copy link
Collaborator

That file won't compile. It's not a test case, but a piece of a very dependent code...
You can't send me to write code to test the bug that you are experiencing.

Anyway I've put 3 charts like you in a scrollview, and it scrolls just fine!

@BurhanMughal
Copy link
Author

Hi Daniel How to check chart is zoomed in ?

@BurhanMughal
Copy link
Author

Can we show Pie chart Value out of slice instead showing inside the slice ?

@BurhanMughal
Copy link
Author

I got the Issue cause, chat.dragEnabled = YES;
When saying NO to chart.dragEnabled it starts scrolling.

But I need both dragEnabled = YES and Scroll View scrolling as well.

Any Idea ??

@BurhanMughal
Copy link
Author

Can one control 2 charts with one scroll, i.e. One View controller has two bar charts in it, If user scrolls one chart second chart should also be scrolled accordingly (Same for Pinch Zoom)?

Thanks.

@AlBirdie
Copy link
Contributor

AlBirdie commented May 6, 2015

Holy moly this thread is a mess, so many different topics...

@BurhanMughal , regarding your last question, yes, you can do that. Simply disable all gesture recognizers of the charts and add those to your ScrollView. These recognizers then handle the transformations for all your charts.

@danielgindi
Copy link
Collaborator

I'm keeping this open- because I want when I get the time, to let the drag gesture know it's not needed when you are zoomed out, and maybe when it reaches the edge.

@danielgindi
Copy link
Collaborator

Seems like UiView is handling the touches against the gestures and decides when to pass them on based on a delegate call so that's where I'll intervene.

danielgindi added a commit that referenced this issue May 7, 2015
… (issue #65)

This will play nice with other gesture recognizers, especially good for when inside a scrollview.
It is disabled by default.
@danielgindi
Copy link
Collaborator

In PieChart/RadarChart, you should now enable rotationWithTwoFingers, so the rotation gesture do not conflict with the dragging of the parent scrollView.

@danielgindi
Copy link
Collaborator

I'm working on a combination where you would be able to let all the Charts play together with ScrollView, by just disabling the isHighlightPerDragEnabled, without moving the gesture recognizers to the ScrollView. Not sure yet that it's possible though

@hudanavroz
Copy link

Can we scroll line chart horizontally?

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

4 participants