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

GraphView: fix width of the vertical labels #71

Merged
merged 1 commit into from
Aug 20, 2013
Merged

GraphView: fix width of the vertical labels #71

merged 1 commit into from
Aug 20, 2013

Conversation

ggounot
Copy link
Contributor

@ggounot ggounot commented Aug 13, 2013

The same width value was used for both horizontal and vertical labels,
making the vertical labels too wide when the horizontal labels are
wider than the real width of the vertical labels. This fix makes use
of the real width of the vertical labels.

Before and after the fix:

before after

.

The same width value was used for both horizontal and vertical labels,
making the vertical labels too wide when the horizontal labels are
wider than the real width of the vertical labels. This fix makes use
of the real width of the vertical labels.
@azislo
Copy link

azislo commented Aug 20, 2013

I also noticed this problem and wanted to report it today.

Your workaround works great ! I think the author should test it and approve.

jjoe64 added a commit that referenced this pull request Aug 20, 2013
GraphView: fix width of the vertical labels
@jjoe64 jjoe64 merged commit 239fc19 into jjoe64:master Aug 20, 2013
@jjoe64
Copy link
Owner

jjoe64 commented Aug 20, 2013

many thanks

@azislo
Copy link

azislo commented Aug 21, 2013

Ok, I tried to enable scrolling and scaling with:

graphView.setScrollable(true);
graphView.setScalable(true);

With that, the graph shrink to 1mm to the left and stays that way:

Other graph's scaling (Advanced graph for example) seems to work ok.

image

@ggounot
Copy link
Contributor Author

ggounot commented Aug 21, 2013

The issue you are describing seems to occur when the viewport is not set.

Thanks for the merge btw.

@azislo
Copy link

azislo commented Aug 21, 2013

you are right. For this example I tried to put:

graphView.setViewPort(data[0].getX(), (data[data.length-1].getX()-data[0].getX()));

And then it works. (This code basically means, set viewport to values, like they would be without any viewport set --> from start to whole data range).

However, when I stop pinching (to zoom), the viewport moves a bit to the right or left. When dealing with a large set of values, that could be disturbing. I will probably open a new issue for that and post a video.

@azislo
Copy link

azislo commented Aug 21, 2013

The video of the latest jumpy scrolling problem is here:

https://www.youtube.com/watch?v=OfdQdeiEAU0

Should I open a new Issue ?

@Lauszus
Copy link
Contributor

Lauszus commented Aug 21, 2013

@azislo
The video is private? Just make it unlisted.
I believe I had the same problem with the viewport jumping around after this commit: ba7ed0f, so I'm actually using an older version for my app right now

@azislo
Copy link

azislo commented Aug 21, 2013

@Lauszus
sorry, had problems with uploading to youtube (multiple times) and eventually forgot to change privacy. It should work now.

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

Successfully merging this pull request may close these issues.

4 participants