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

Legend Height Adjustment #81

Closed
michaelmcguire opened this issue May 11, 2015 · 3 comments
Closed

Legend Height Adjustment #81

michaelmcguire opened this issue May 11, 2015 · 3 comments
Labels

Comments

@michaelmcguire
Copy link

Let me start by saying I appreciate the library! It's been great to work with.

I had a question regarding adjusting the height of the ChartLegend (when in one of the bottom positions). In the Demo project's "Line Chart 2 Chart", by default the legend looks like this:

ios-charts-image-1

I've been looking for an API to adjust the space set aside for the legend. I saw that the ChartLegend has a property yOffset. When changing the default value from 6.0 to something like 20.0, you get this:

ios-charts-image-2

This moved the legend up 20 points (which would be expected based on the name), but didn't actually change the space used for the legend. I'd like to be able to move the legend closer and/or adjust the space allowed for the legend so as to not have unnecessary space. It appears the height for a ChartLegend is calculated in the BarLineChartViewBase on line 338 where it is set to 3 times the line height, which makes for a good visual default, but it not customizable.

I'd like to add something to API so I can configure it the way I want, but before doing so, was wondering if this is something you would be interested in seeing? If so, do you think an additional property on the ChartLegend itself is the appropriate place? Or something on BarLineChartViewBase itself?

@michaelmcguire
Copy link
Author

Hey Daniel, sorry to bump this, but was wondering if you've had any chance to think this over?

@danielgindi
Copy link
Collaborator

I hadn't had time yet- having a busy week...

‏בתאריך יום חמישי, 14 במאי 2015, Michael McGuire notifications@github.com
כתב:

Hey Daniel, sorry to bump this, but was wondering if you've had any chance
to think this over?


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

@danielgindi
Copy link
Collaborator

This is an old issue - but it should have been closed long ago, as there are many customizations that allow this now.

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

No branches or pull requests

2 participants