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

Changing grid insets after the plot has been drawn once do not have effect #78

Closed
hohteri opened this issue Apr 25, 2018 · 2 comments
Closed
Assignees
Labels
Milestone

Comments

@hohteri
Copy link

hohteri commented Apr 25, 2018

  • Description of the problem

Changing grid insets after the plot has been drawn once do not have effect.

  • Steps to reproduce the issue

After drawing the plot once
// kotlin
plot.clear()
plot.graph.gridInsets.bottom = PixelUtils.dpToPix(40f)
plot.redraw()

This is because XYGraphWidget onResize is the only place where gridInsets have an effect.
This is called by Widget checkSize which guards calling resize with size of the widget rect. CheckSize is called on widget.draw() But the widget rect does not change due to gridInset being changed.

One quick fix could be to call onResize whenever gridInsets is set.

  • Version(s) of Androidplot being used

1.5.4

@halfhp
Copy link
Owner

halfhp commented Apr 25, 2018

Hmm very likely a regression caused by this change. Thanks for the report - will take a look.

@halfhp
Copy link
Owner

halfhp commented May 23, 2018

Fixed for the 1.5.5 release

@halfhp halfhp closed this as completed May 23, 2018
halfhp added a commit that referenced this issue May 23, 2018
* remove unused button from simple xy plot

* #78 Fixes issue where setting XYGraphWidget insets has no effect.

* XYGraphWidget.drawMarkerText is now protected instead of private.

* 1.5.5 documentation updates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants