fixed setAutoRangePadding() regression bug #277
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixed setAutoRangePadding() regression bug and simplified auto range handling
recomputation and redrawing of axes (on range-, tick unit, and notably scale changes) and update of the internal caches was done sometimes out-of-order causing the canvas being redrawn before the new axis settings have been in place. Previously this appeared to be less frequently visible since the change of the min/max axis range property triggered subsequent update events and thus drawing of the canvas.
N.B. Interestingly, this did not show up in the numeric unit-tests and only while visually testing. The numerical API results seemed to have been always correct and only the canvas update has been missing sometimes.
Re-ordered recomputation of auto ranges, moved most of the computation into the
AbstractAxis::invalidateRange(..)
removed redundant code in theAbstractAxis
and derived classes (notably 'getAxisRange()which has been performing the same function as the existing 'getRange()
). The performance -- especially for rare or one-time updates -- should be more consistent now.Updated the SimpleChartSample to reflect and test these changes (here with 50% padding on top and bottom of the DataSet):
and updated API in the commented code section (became dated/incorrect). Collateral effects remain to be checked/tested.