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

[feature request] enable legend view scrollable #151

Closed
liuxuan30 opened this issue Jun 15, 2015 · 9 comments
Closed

[feature request] enable legend view scrollable #151

liuxuan30 opened this issue Jun 15, 2015 · 9 comments

Comments

@liuxuan30
Copy link
Member

I am not sure if the legend view is scrollable. I went through the code, but not found how can I enable it. If I have several legends and their label is long, it is better we can scroll the legend view to enable user can scroll on the legend. e.g. the legend view is a UIScrollView.

@danielgindi
Copy link
Collaborator

Don't you prefer calculating how much dpace is needed for the legend and extending the view?

@liuxuan30
Copy link
Member Author

usually the chart is centered, and the legend is at the bottom. If the legends are too many, finally it will go out of screen. If we extend the legend view, it either invade the chart's space, having some overlap, or some part of the legend is out of screen.

@danielgindi
Copy link
Collaborator

What I do in an existing app is notifyDataSetChange() to tell it to
calculate the legend,
and then take the required size from the legend - and append it to the
view's height. And then of course tell the legend that it has more space.

On Tue, Jun 16, 2015 at 11:21 AM, Xuan notifications@github.com wrote:

usually the chart is centered, and the legend is at the bottom. If the
legends are too many, finally it will go out of screen. If we extend the
legend view, it either invade the chart's space, having some overlap, or
some part of the legend is out of screen.


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

@liuxuan30
Copy link
Member Author

if the legend height is very large, will the chart itself shrink its height?

@danielgindi
Copy link
Collaborator

Yes. And you can control the "how much" through properties introduced lately

@liuxuan30
Copy link
Member Author

@danielgindi I tested, the legend will horizontally expand if I have 5 or more legend items with out wrapping. If not support scrolling (which I think is the best way), consider support legend wrapping?

@danielgindi
Copy link
Collaborator

There is legend wrapping currently for bottom legends, you just have to
turn it on :)

‏בתאריך יום שישי, 19 ביוני 2015, Xuan notifications@github.com כתב:

@danielgindi https://github.com/danielgindi I tested, the legend will
horizontally expand if I have 5 or more legend items with out wrapping. If
not support scrolling (which I think is the best way), consider support
legend wrapping?


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

@liuxuan30
Copy link
Member Author

holy sht... I just saw wordWrapEnabled is in the middle of the code after I implemented my legend view with scroll view...
BTW, I still recommend you to support scrolling:) This will not shrink the chart size.

@danielgindi
Copy link
Collaborator

Well we do not plan to support scrollable legends currently, as it is not a commonly required feature and not a good UX in most cases...
Maybe in the future :-)

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