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

Updates to Axis #349

Merged

Conversation

elizabethcarney
Copy link

@elizabethcarney elizabethcarney commented Jul 30, 2020

  • Fixed bug: in Draw(), if a left axis was being created and its scale range lower limit was not zero, its label would be way off (not centered, sometimes out of the svg); fixed so that label is positioned correctly now
    • Fixed by switching the signs of the range limits if a left axis is being drawn. This works because when setting a range, you're thinking on the y-axis: a more positive number means a lower position on the screen. But since left axis labels are rotated -90, a shift in that same direction (lower position on the screen) is on the x-axis and has to be achieved with a more negative number.
    • Before, the x_divisor changed from 2 to -2 if a left axis was being created. That worked if the lower limit of the range was 0, because dividing by -2 had the same effect as switching the sign of the upper limit of the range (and the 0 made no difference). Now the divisor is just 2 no matter the type of axis.
  • Restructured test file (organize creation of objects by test instead of by type)
  • Wrote tests for axes created on various scale ranges (particularly those with non-zero lower limits) as well as DrawAxes()

@amlalejini amlalejini merged commit dc8f20b into devosoft:d3-wrapper Jul 31, 2020
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.

2 participants