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

setNumHorizontalLabels not working correctly in 4.1.0. #413

Closed
JDCGW opened this issue Jul 5, 2016 · 5 comments
Closed

setNumHorizontalLabels not working correctly in 4.1.0. #413

JDCGW opened this issue Jul 5, 2016 · 5 comments
Milestone

Comments

@JDCGW
Copy link

JDCGW commented Jul 5, 2016

Great library! Thanks for the work you put in it. Anyway, setNumHorizontalLabels is no longer working correctly in 4.1.0. It works fine in 4.0.1. I've attached my code and photos showing what happens.

graph.getViewport().setXAxisBoundsManual(true);
graph.getViewport().setMinX(10);
graph.getViewport().setMaxX(25);
graph.getGridLabelRenderer().setNumHorizontalLabels(6);

4.0.1
4 0 1

4.1.0
4 1 0

*Edited 03/09/17 - Changed from setNumVerticalLabels to setNumHorizontalLabels, as setNumHorizontalLabels is really working incorrectly.

@JDCGW
Copy link
Author

JDCGW commented Oct 13, 2016

I've just tested 4.2.1, and this is still not working FYI.

@jjoe64 jjoe64 added this to the 4.2.2 milestone Oct 13, 2016
@maydin
Copy link

maydin commented Mar 9, 2017

@JDCGW in your code you set vertical label count. But in your screenshots, horizontal label counts are changing. Am i missing something?

@JDCGW
Copy link
Author

JDCGW commented Mar 9, 2017

@maydin You're correct! I meant setNumHorizontalLabels, not setNumVerticalLabels. Anyway, I've updated the original post, and I've retested. The setNumHorizontalLabels is still not working correctly past 4.0.1.

@JDCGW JDCGW changed the title setNumVerticalLabels not working correctly in 4.1.0. setNumHorizontalLabels not working correctly in 4.1.0. Mar 15, 2017
@maydin
Copy link

maydin commented Apr 10, 2017

It seems this is not a bug, this is a feature :)
If you disable humanRounding, you can get the same number of labels with 4.0.1. I executed your sample with disabling humanRounding.
graph.getGridLabelRenderer().setHumanRounding(false);
@AppsThatMatter could you please confirm?

@JDCGW
Copy link
Author

JDCGW commented Apr 10, 2017

@maydin Thank you! That fixed the issue.

@JDCGW JDCGW closed this as completed Apr 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants