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

ChartLegend yEntrySpace not work #886

Closed
tcper opened this issue Mar 27, 2016 · 2 comments
Closed

ChartLegend yEntrySpace not work #886

tcper opened this issue Mar 27, 2016 · 2 comments
Labels

Comments

@tcper
Copy link

tcper commented Mar 27, 2016

In ChartsDemo project, PieChartViewController
I set the _chartView.legend.yEntrySpace = 30.f;
It seems no change, is there some tricks to make yEntrySpace work?

@liuxuan30
Copy link
Member

neededHeight = labelLineHeight * CGFloat(calculatedLineSizes.count) + yEntrySpace * CGFloat(calculatedLineSizes.count == 0 ? 0 : (calculatedLineSizes.count - 1))

and later used in calculateOffsets():

offsetBottom += min(_legend.neededHeight + yOffset, _viewPortHandler.chartHeight * _legend.maxSizePercent)

So it's working I think, just not what you think? You can read the code.

@danielgindi
Copy link
Collaborator

Yes, it is ignore, I guess we forgot that way back when changing a lot about the legend. I'll try to make it work again

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

3 participants