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 any possibility for grouping x axis values in line chart? #798

Closed
rajesh055 opened this issue Mar 4, 2016 · 5 comments
Closed

Comments

@rajesh055
Copy link

screen shot 2016-03-04 at 1 19 26 pm

This is my requirement in iPhone and iPad, I've got it upto plotting the values based on weeks as in,

trials

I've included iOS charts FM in my objective - c code, I've been searching for a long time now to group axis values without any luck. I just want a confirmation, if there is a possibility by default or should I customise the chart's area? I 'should' say this, this is one great framework, thank you for the effort!

@liuxuan30
Copy link
Member

are you saying you want to group 'week #n' for every month? If so, you can wirte your own logic to get the sum values for the same week, and put them into one single data set?
x axis values are index based, and only has string values.

@rajesh055
Copy link
Author

No no sorry for not being clear, of course I can group the values, I just want to make sure if there is any options to include a multi-line label? to display the months as in the first image. I referred to one of the issues and now I've managed to include a lengthy label to show the month in the second line of the xaxis label, so is there any other way to do this?

@liuxuan30
Copy link
Member

I see. It does not support such groups. You can try customize it yourself. take a look at x axis renderer code. Should not be hard for you

@rajesh055
Copy link
Author

That's great, I'll try to customise the part myself. Thank you once again, for the suggestion.

@rajesh055 rajesh055 reopened this Mar 7, 2016
@danielgindi
Copy link
Collaborator

You have several ways to achieve this. You can do this with another view below the chart, taking position data from the transformer. Or you can actually print another line of labels, or add \n new lines to your labels.

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