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

how to center legend text of LineChartView? #3789

Closed
slzrafael opened this issue Dec 19, 2018 · 1 comment
Closed

how to center legend text of LineChartView? #3789

slzrafael opened this issue Dec 19, 2018 · 1 comment

Comments

@slzrafael
Copy link

I want to center my legend text relative of all graph not only canvas width.

I use this code to do this:

            let legend = graph.legend
            legend.drawInside = false
            legend.wordWrapEnabled = true
            legend.form = .circle
            legend.orientation = .horizontal
            legend.verticalAlignment = .top
            legend.horizontalAlignment = .center

But i have this result:

image

@liuxuan30
Copy link
Member

I guess you need to override some code. The legend in this library is not as smart as you think. I admit there is a lot to improve, but we don't have the man power to do that.

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