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

Is there a way to have multi line labels in x axis. #790

Closed
niksdgr8 opened this issue Mar 3, 2016 · 2 comments
Closed

Is there a way to have multi line labels in x axis. #790

niksdgr8 opened this issue Mar 3, 2016 · 2 comments

Comments

@niksdgr8
Copy link

niksdgr8 commented Mar 3, 2016

I have a label which has a very big text. So in portrait mode the label is shown only for alternate bars where as in landscape mode it shows for all bars. Please see the images for further clarification.
simulator screen shot mar 3 2016 2 55 48 pm
simulator screen shot mar 3 2016 2 55 51 pm

@liuxuan30
Copy link
Member

x axis supports word wrapping. So check it out and turn it on:

    /// *Note: currently supports all charts except pie/radar/horizontal-bar*
    public var wordWrapEnabled = false

    /// the width for wrapping the labels, as percentage out of one value width.
    /// used only when isWordWrapEnabled = true.
    /// 
    /// **default**: 1.0
    public var wordWrapWidthPercent: CGFloat = 1.0

@zahidshaikh795
Copy link

Do you get the solution ?
I have set both:
lineChart.xAxis.wordWrapEnabled = true
lineChart.xAxis.wordWrapWidthPercent = 1
but with no effect.

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

3 participants