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

Placement Refactor #94

Open
escape-llc opened this issue Mar 3, 2022 · 0 comments
Open

Placement Refactor #94

escape-llc opened this issue Mar 3, 2022 · 0 comments
Assignees
Labels
decoration feature item is a feature request series
Milestone

Comments

@escape-llc
Copy link
Owner

escape-llc commented Mar 3, 2022

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.

@escape-llc escape-llc added feature item is a feature request series decoration labels Mar 3, 2022
@escape-llc escape-llc added this to the Nuget 2.0.0 milestone Mar 3, 2022
@escape-llc escape-llc self-assigned this Mar 3, 2022
@escape-llc escape-llc changed the title Marker Placement Placement Refactor Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
decoration feature item is a feature request series
Projects
None yet
Development

No branches or pull requests

1 participant