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

Mark gap space between marks #13

Closed
bhavinsetubridge opened this issue Feb 5, 2018 · 1 comment
Closed

Mark gap space between marks #13

bhavinsetubridge opened this issue Feb 5, 2018 · 1 comment

Comments

@bhavinsetubridge
Copy link

Is there any solution to find space between visible marks.

when number of marks count is less than 40 ,the space between mark automatically increase.

can you please update regarding space between marks.

private void setupGaps(double step, double offset) { gaps[0] = (float) Math.sin(offset / 2); float sum = gaps[0]; double angle = offset; int n = 1; while (angle + step <= Math.PI) { gaps[n] = (float) Math.sin(angle + step / 2); sum += gaps[n]; angle += step; n++; } float lastGap = (float) Math.sin((Math.PI + angle) / 2); sum += lastGap; if (n != gaps.length) { gaps[gaps.length - 1] = -1; } float k = view.getWidth() / sum; for (int i = 0; i < gaps.length; i++) { if (gaps[i] != -1) { gaps[i] *= k; } } }

@shchurov
Copy link
Owner

shchurov commented Feb 6, 2018

Hi, @bhavinsetubridge
Sorry, I don't fully understand what you mean. Maybe if you provide an example where you need this I will be able to help.

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