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

fix: JS charts should handle shifts, read subscription data by key #6076

Merged
merged 3 commits into from
Sep 19, 2024

Conversation

niloc132
Copy link
Member

Only viewport subscriptions should read data (and formatting) by
position. Also fixes an error where -1 was not returned when an invalid
position was checked in a RangeSet.

Fixes #6074
Fixes #2435

Only viewport subscriptions should read data (and formatting) by
position. Also fixes an error where -1 was not returned when an invalid
position was checked in a RangeSet.

Fixes deephaven#6074
.allMatch(arr -> arr.length == indexes.length);
assert cachedData.values().stream().flatMap(m -> m.values().stream()).allMatch(arr -> arr
.reduce((Object val, Any p1, int p2) -> ((Integer) val) + 1, 0) == indexes.length);
// then adds
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't this where you should apply shifts?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(discussed on videocall) This implementation doesn't care about shifts - the rowSet provided by the subscription is already correctly shifted, we just need to splice the values into the (flat) array so that downstream charting can ingest those arrays directly.

@niloc132 niloc132 merged commit ff5478d into deephaven:main Sep 19, 2024
16 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Sep 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ticking charts in JS API are broken JS ChartData type doesn't handle shifts correctly
2 participants