Skip to content

Conversation

@lukasmasuch
Copy link
Collaborator

Describe your changes

Improves the hovering performance of st.line_chart with larger datasets.

Before:

Screen.Recording.2025-11-28.at.15.35.32.mov

After:

Screen.Recording.2025-11-28.at.15.35.01.mov

GitHub Issue Link (if applicable)

Testing Plan


Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

Copilot AI review requested due to automatic review settings November 28, 2025 14:39
@snyk-io
Copy link
Contributor

snyk-io bot commented Nov 28, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@lukasmasuch lukasmasuch added security-assessment-completed Security assessment has been completed for PR change:feature PR contains new feature or enhancement implementation impact:users PR changes affect end users labels Nov 28, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 28, 2025

✅ PR preview is ready!

Name Link
📦 Wheel file https://core-previews.s3-us-west-2.amazonaws.com/pr-13156/streamlit-1.51.0-py3-none-any.whl
📦 @streamlit/component-v2-lib Download from artifacts
🕹️ Preview app pr-13156.streamlit.app (☁️ Deploy here if not accessible)

@lukasmasuch lukasmasuch added change:bugfix PR contains bug fix implementation and removed change:feature PR contains new feature or enhancement implementation labels Nov 28, 2025
@lukasmasuch lukasmasuch requested review from Copilot and removed request for Copilot November 28, 2025 14:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the hovering performance of st.line_chart when working with large datasets by optimizing the hover interaction implementation.

Key Changes:

  • Introduces a threshold-based throttling mechanism for hover events on large datasets (>1000 points)
  • Refactors hover tooltip rendering from conditional opacity to filter-based approach
  • Updates mouse event handling from pointerover/pointerout to mousemove/mouseleave

Copy link
Collaborator

@sfc-gh-lwilby sfc-gh-lwilby left a comment

Choose a reason for hiding this comment

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

LGTM

@lukasmasuch lukasmasuch merged commit 23b9a8f into develop Nov 28, 2025
42 checks passed
@lukasmasuch lukasmasuch deleted the improve-line-chart-hovering-performance branch November 28, 2025 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:bugfix PR contains bug fix implementation impact:users PR changes affect end users security-assessment-completed Security assessment has been completed for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve hovering performance on large st.line_chart elements

3 participants