-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Conversation
❌ 1 Tests Failed:
View the top 1 failed tests by shortest run time
To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard |
// 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]); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
Screen.Recording.2024-09-27.at.4.12.22.PM.mov