-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Summary
Now that placement data is transitioning to World Coordinates, we must eliminate previous assumptions about placement data where necessary. Previously the "invariant" geometry was simply copied through, but this is no longer suitable in light of supporting alternate orientations.
The "default" placement (NDC, WC) used by ValueLabels (when none is provided) is no longer suitable for Line and Marker series types, because the x-component is (assumed) in NDC (x-component offset).
Actual Behavior
The updated ValueLabels bound to Line and Marker series no longer position correctly on x-axis. However when bound to other decorations like HorizontalBand the NDC x-component still positions correctly.
Expected Behavior
No visual change in behavior from any labels.
Additional Details
Create a new placement type MarkerPlacement that represents a specific "marker" point in WC, so the rest of the new ValueLabels logic works. All the series types must now provide accurate placement data in WC. Decorations should continue to use NDC in the appropriate direction, e.g. a HorizontalRule continues to use NDC for the x-component and WC for the y-component.
Any series creating RectangleGeometry (Column, Stacked Column, Candlestick) must be updated to retain and generate WorldRect for placement.
The Line, Marker, and Image Marker series must be updated, because they do not provide placement and relied on the default in ValueLables.
Follow up
Unfortunately there is a complication with "scrolling" in the form of incremental updates, which alter the "index" of state items that appear on the "wrong side" of the action point, e.g. an insert affects all items past the insert index. This will force back into the "two-stage" calculation of placement, so the World Rect still needs to be invariant.
Also there needs to be explicit placement wrt to using NDC in one axis, based on orientation, so for a HorizontalRule to present vertically, placement must switch to (WC,NDC). Also note HorizontalRule should be renamed to ValueRule.