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

Set vertical legend #2233

Closed
CosmicYogi opened this issue Mar 8, 2017 · 5 comments
Closed

Set vertical legend #2233

CosmicYogi opened this issue Mar 8, 2017 · 5 comments

Comments

@CosmicYogi
Copy link

CosmicYogi commented Mar 8, 2017

Is it possible to set vertical legend I mean I want to display Speed , Distance and some other properties in different graphics on the Vertical axis (y-axis) in vertical alignment i.e.., text from top to bottom.
I am adding the screenshot of the code I am trying and result I am getting below.

screen shot 2017-03-08 at 9 38 50 pm

screen shot 2017-03-08 at 9 39 00 pm

as you can see in the image that the legend text i.e.., Distance(km) is appearing on the left of graph that is fine but it's appearing horizontally the thing is I want to make it appear vertically.
How would it be possible if I am not wrong then I had tried everything.

@liuxuan30
Copy link
Member

liuxuan30 commented Mar 10, 2017

I don't understand, are you saying Orientation.vertical does not work? Your image just has one legend, which tells nothing.
I tried with ChartDemo, it works as what you want:
image

@CosmicYogi
Copy link
Author

Actually what my intension was - #35
I wanted to make that legent verticle so I can somehow make it look like a label to Y-Axis
I searched all the issues and finally found the one I had listed above is what I actually wanted to say.

@liuxuan30
Copy link
Member

I see. However it's not supported yet.. I will try find some time to do that.

@CosmicYogi
Copy link
Author

@liuxuan30 would it be okay if I send a pull request to do that?
I mean I would try to do that.
Do you people accept pull requests?

@liuxuan30
Copy link
Member

liuxuan30 commented Mar 14, 2017

Of course! Just remember it might take a long time, due to everyone is busy and have to port to Android portion as well..
But we definitely needs help and PRs

I used to develop this for my previous company, however in terms of named axis feature, I have to think about every x and y axis (bottom and top, left and right), support full label rotation (not just 0 and 90 degrees rotation) that's where I paused.

Something you need to consider while sending PRs:

  1. follow the code style
  2. be flexible for the name label: e.g. space offset, rotation, etc.

Actually, offsets are just properties and simple math. However the rotation is a problem: you have to know where the anchor is and rotate.

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