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

feat(explore): Syncing chart cursors. #78285

Merged
merged 3 commits into from
Oct 3, 2024
Merged

Conversation

Abdkhan14
Copy link
Contributor

Screen.Recording.2024-09-27.at.4.12.22.PM.mov

@Abdkhan14 Abdkhan14 requested a review from a team as a code owner September 27, 2024 20:13
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Sep 27, 2024
Copy link

codecov bot commented Sep 27, 2024

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
7902 1 7901 0
View the top 1 failed tests by shortest run time
Performance > TransactionSummary renders additional Web Vital column Performance > TransactionSummary renders additional Web Vital column
Stack Traces | 0.397s run time
Error: expect(element).toHaveTextContent()

Expected element to have text content:
  deadbeef
Received:

    at Object.<anonymous> (.../views/performance/transactionEvents.spec.tsx:256:37)

To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard

Comment on lines +119 to +126
// Synchronize chart cursors
const [_, setRenderTrigger] = useState(0);
useEffect(() => {
if (!timeSeriesResult.isPending) {
echarts?.connect(EXPLORE_CHART_GROUP);
setRenderTrigger(prev => (prev + 1) % Number.MAX_SAFE_INTEGER);
}
}, [visualizes, timeSeriesResult.isPending]);
Copy link
Member

Choose a reason for hiding this comment

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

This seems like a hack to re-run echarts.connect on every render. Can this be limited to just [timeseriesResult.data] so it reconnects each time the timeseries is fetched?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey, tried timeseriesResult.data, the cursors don't persist on hover.

@Abdkhan14 Abdkhan14 merged commit 1527e4d into master Oct 3, 2024
42 of 43 checks passed
@Abdkhan14 Abdkhan14 deleted the abdk/explore-charts-syncing branch October 3, 2024 14:43
@github-actions github-actions bot locked and limited conversation to collaborators Oct 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants