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

PieChart legend.yOffset bug #2551

Closed
iad24 opened this issue Jun 23, 2017 · 0 comments
Closed

PieChart legend.yOffset bug #2551

iad24 opened this issue Jun 23, 2017 · 0 comments

Comments

@iad24
Copy link

iad24 commented Jun 23, 2017

I have this code:

**pieChartView.delegate = self
pieChartView.legend.enabled = false
pieChartView.drawEntryLabelsEnabled = false
pieChartView.drawCenterTextEnabled = true
pieChartView.holeRadiusPercent = 0.95
pieChartView.drawSlicesUnderHoleEnabled = false
pieChartView.highlightPerTapEnabled = false
pieChartView.chartDescription = nil

    pieChartView.legend.horizontalAlignment = .center
    pieChartView.legend.verticalAlignment = .bottom
    pieChartView.legend.orientation = .vertical
    pieChartView.legend.drawInside = false
    
    pieChartView.legend.yEntrySpace = 10.0**

it always clip the last the legend, irregardless of how many entries in the data set.
screen shot 2017-06-23 at 5 54 52 pm

screen shot 2017-06-23 at 5 56 10 pm

I need to put this line to move it up close to the pie chart:
pieChartView.legend.yOffset = 10.0

screen shot 2017-06-23 at 5 58 58 pm

If I set to -10.0, it will clip some more.
pieChartView.legend.yOffset = -10.0

@iad24 iad24 closed this as completed Jun 23, 2017
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

1 participant