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

Line layer decimation, interpolation, snapping, and tooltip improvements #1049

Merged
merged 26 commits into from
Feb 15, 2024

Conversation

AaronPlave
Copy link
Contributor

@AaronPlave AaronPlave commented Dec 8, 2023

Resource plot decimation and hover value interpolation. Significantly improves resource plotting performance and resource tooltip behavior.

Changes:

  • Decimate line layer points using min-max algorithm (from chartJS, see https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019YLKSA2&l=en-US) to only draw the necessary number of points to represent the data given the number of available pixels.
  • Limit line drawing to the visible time range and connect the line to the neighboring point on each side, if available, to maintain correctness of the plot.
  • Rework timeline tooltips for clarity
  • Implement better snapping for timeline line layer tooltip
  • Implement hover value interpolation option for line layers
  • Option to hide the timeline tooltip
  • Option to only show the tooltip when close to a line segment
  • Add hover styling to the snapped/interpolated point
  • Add indicator to snapped/interpolated point. If interpolating, show indicators on the values used for interpolation.
  • Update timeline icon bar to new tray design with additional menu

Closes #856, closes #959. Multiple PRs have addressed the #959 but with this PR, performance targets have been achieved for the Clipper TT-6 plan.

TODO:

  • Icons for decimate/show all points, interpolate cursor value (not to be confused with the future feature of interpolate step function points), and "show tooltip only when you're hovering over the line". Or stuff these into some sort of menu with words. See Design icon tray for top of timeline #1076
  • Test with a variety of input data
  • Option to hide tooltip
  • Improve hover point styling, try scaling by layer point size, different styling, etc
  • Document and clean code, mention that the min max implementation is from Chart.js
  • Rework tooltip, remove ID, use layer name if provided, show layer color?, indicate that nearest point is left/right if not on screen
  • Gap compatibility
  • Improve hit detection on spikes
  • Integrate with x-range as line rendering
  • Show attention director if closest point is offscreen on hover
  • Confirm that these options should not be part of the view

@AaronPlave AaronPlave added the DON'T MERGE Do Not Merge This Branch label Dec 8, 2023
@AaronPlave AaronPlave force-pushed the feat/decimation-prototyping branch from 2c313fc to 59a887e Compare December 8, 2023 00:35
@AaronPlave AaronPlave added the performance A code change that improves performance label Dec 8, 2023
@AaronPlave AaronPlave self-assigned this Dec 8, 2023
@AaronPlave AaronPlave force-pushed the feat/decimation-prototyping branch from 97833ba to d012496 Compare December 11, 2023 19:39
@AaronPlave AaronPlave force-pushed the feat/decimation-prototyping branch from e5ddcdc to f04b627 Compare December 13, 2023 00:43
@AaronPlave AaronPlave force-pushed the feat/decimation-prototyping branch from f172ae1 to b8a2e67 Compare December 21, 2023 20:37
@AaronPlave AaronPlave changed the title Feat/decimation prototyping Line layer decimation, interpolation, snapping, and tooltip improvements Dec 27, 2023
@AaronPlave AaronPlave force-pushed the feat/decimation-prototyping branch from e95d23d to a911a95 Compare January 16, 2024 21:54
@AaronPlave AaronPlave marked this pull request as ready for review January 24, 2024 19:50
@AaronPlave AaronPlave requested a review from a team as a code owner January 24, 2024 19:50
@AaronPlave AaronPlave requested a review from jeffpamer January 24, 2024 19:50
@AaronPlave AaronPlave force-pushed the feat/decimation-prototyping branch from 8452d83 to 07edc67 Compare February 15, 2024 17:20
@AaronPlave AaronPlave merged commit ce2c781 into develop Feb 15, 2024
4 checks passed
@AaronPlave AaronPlave deleted the feat/decimation-prototyping branch February 15, 2024 17:46
JosephVolosin pushed a commit that referenced this pull request Aug 20, 2024
…nts (#1049)

* Line chart decimation option using client-side min-max algorithm
* Only render line points within time view plus neighboring left/right points
* Rework line point hit testing and snapping to improve usability
* Improve highlighted point legibility
* Remove resource id from tooltip
* Improve timeline tooltip styling and display
* Option to hide timeline tooltip
* Allow null for LinePoint y value
* Improve line hover value intersection
* Option to interpolate cursor value when hovering over line charts
* Hint points to left and right of interpolated point
* Integrate decimation and interpolation into x-range as line layer rendering
* Defer scaling points until after decimation for non-ordinal line layers.
* Update stellar version
* Implement new timeline icon tray and menu
JosephVolosin pushed a commit that referenced this pull request Oct 21, 2024
…nts (#1049)

* Line chart decimation option using client-side min-max algorithm
* Only render line points within time view plus neighboring left/right points
* Rework line point hit testing and snapping to improve usability
* Improve highlighted point legibility
* Remove resource id from tooltip
* Improve timeline tooltip styling and display
* Option to hide timeline tooltip
* Allow null for LinePoint y value
* Improve line hover value intersection
* Option to interpolate cursor value when hovering over line charts
* Hint points to left and right of interpolated point
* Integrate decimation and interpolation into x-range as line layer rendering
* Defer scaling points until after decimation for non-ordinal line layers.
* Update stellar version
* Implement new timeline icon tray and menu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance A code change that improves performance timeline
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Look into plotting improvements Interpolated values when hovering on line
3 participants