Data Trails: Sync cursor of all breakdown graphs with main metric graph (#80226)

* Sync cursor of all breakdown graphs with main metric graph

* Remove syncs from breakdown scene since they're not needed
This commit is contained in:
Andre Pereira 2024-01-11 16:10:16 +00:00 committed by GitHub
parent a70d48a724
commit aa73dfa735
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,6 @@
import React, { useState } from 'react';
import { DashboardCursorSync } from '@grafana/data';
import {
SceneObjectState,
SceneObjectBase,
@ -11,6 +12,7 @@ import {
SceneObjectUrlValues,
PanelBuilders,
sceneGraph,
behaviors,
} from '@grafana/scenes';
import { ToolbarButton, Box, Stack, Icon } from '@grafana/ui';
@ -159,6 +161,7 @@ function buildGraphScene(metric: string) {
return new SceneFlexLayout({
direction: 'column',
$behaviors: [new behaviors.CursorSync({ key: 'metricCrosshairSync', sync: DashboardCursorSync.Crosshair })],
children: [
new SceneFlexItem({
minHeight: MAIN_PANEL_MIN_HEIGHT,