Layout throws ArgumentException
Closed this issue · 1 comments
Summary
On phone, the demo application triggers an ArgumentException
in the Chart
during layout, when the Padding
exceeds the actual dimensions.
This occurs when clicking to open the sidebar panel, because it "shrinks" the Chart
in one dimension beyond its padding.
Actual Behavior
Shrinking the Chart
to a size where the Rect
width and/or height becomes less than zero triggers an ArgumentException
from the Rect
constructor.
Expected Behavior
Not.
Additional Details
Precondition the constructor call. Specifically, ignore any padding when it would compromise the size of the Chart
bounds.
Any layout issues should be reported to the error info handler.
Investigate the entire layout pipeline for bounds issues, because these will also trigger ArgumentException
when space is requested.
There's a possibility space may not be available; in this case, the ILayoutContext
must reserve some space for the data area, and other requests for space.
Components that request space must be prepared to accept less than requested space, and lay out accordingly. For example, an axis may not get enough space to display axis labels, but should get enough space to display its axis bar.
See #49 for details.