escape-llc/yet-another-chart-component

CategoryAxis responds to incremental add incorrectly

escape-llc opened this issue · 1 comments

Summary

Incrementally adding data causes the CategoryAxis labels to be misplaced.

Actual Behavior

When incrementally adding data, the CategoryAxis updates its labels positions incorrectly, leaving a "hole" at the spot where the "next" label should be.

Expected Behavior

Should lay out without any misplaced labels.

Additional Details

Use the demo application and Chart One then use the "add at front" button to add new data to the zeroth position (left-most).

The logic had off-by-one error in this scenario, which caused the misplacement.