diff --git a/packages/osd-charts/integration/tests/__image_snapshots__/all-test-ts-baseline-visual-tests-for-all-stories-interactions-cursor-update-action-visually-looks-correct-1-snap.png b/packages/osd-charts/integration/tests/__image_snapshots__/all-test-ts-baseline-visual-tests-for-all-stories-interactions-cursor-update-action-visually-looks-correct-1-snap.png index e74bf1f00d80..bfd6a82719cd 100644 Binary files a/packages/osd-charts/integration/tests/__image_snapshots__/all-test-ts-baseline-visual-tests-for-all-stories-interactions-cursor-update-action-visually-looks-correct-1-snap.png and b/packages/osd-charts/integration/tests/__image_snapshots__/all-test-ts-baseline-visual-tests-for-all-stories-interactions-cursor-update-action-visually-looks-correct-1-snap.png differ diff --git a/packages/osd-charts/integration/tests/__image_snapshots__/interactions-test-ts-interactions-tooltip-sync-show-synced-crosshairs-1-snap.png b/packages/osd-charts/integration/tests/__image_snapshots__/interactions-test-ts-interactions-tooltip-sync-show-synced-crosshairs-1-snap.png index 282f93670f16..f1f07593d474 100644 Binary files a/packages/osd-charts/integration/tests/__image_snapshots__/interactions-test-ts-interactions-tooltip-sync-show-synced-crosshairs-1-snap.png and b/packages/osd-charts/integration/tests/__image_snapshots__/interactions-test-ts-interactions-tooltip-sync-show-synced-crosshairs-1-snap.png differ diff --git a/packages/osd-charts/integration/tests/__image_snapshots__/interactions-test-ts-interactions-tooltip-sync-show-synced-extra-values-in-legend-1-snap.png b/packages/osd-charts/integration/tests/__image_snapshots__/interactions-test-ts-interactions-tooltip-sync-show-synced-extra-values-in-legend-1-snap.png new file mode 100644 index 000000000000..64ae59836d4a Binary files /dev/null and b/packages/osd-charts/integration/tests/__image_snapshots__/interactions-test-ts-interactions-tooltip-sync-show-synced-extra-values-in-legend-1-snap.png differ diff --git a/packages/osd-charts/integration/tests/__image_snapshots__/interactions-test-ts-interactions-tooltip-sync-show-synced-tooltips-1-snap.png b/packages/osd-charts/integration/tests/__image_snapshots__/interactions-test-ts-interactions-tooltip-sync-show-synced-tooltips-1-snap.png index bf61fcbb7765..d2612201ec75 100644 Binary files a/packages/osd-charts/integration/tests/__image_snapshots__/interactions-test-ts-interactions-tooltip-sync-show-synced-tooltips-1-snap.png and b/packages/osd-charts/integration/tests/__image_snapshots__/interactions-test-ts-interactions-tooltip-sync-show-synced-tooltips-1-snap.png differ diff --git a/packages/osd-charts/integration/tests/interactions.test.ts b/packages/osd-charts/integration/tests/interactions.test.ts index 7f98e0523f18..caf44747bf12 100644 --- a/packages/osd-charts/integration/tests/interactions.test.ts +++ b/packages/osd-charts/integration/tests/interactions.test.ts @@ -221,16 +221,27 @@ describe('Interactions', () => { it('show synced tooltips', async () => { await common.expectChartWithMouseAtUrlToMatchScreenshot( 'http://localhost:9001/?path=/story/interactions--cursor-update-action&knob-local%20tooltip%20type_Top%20Chart=vertical&knob-local%20tooltip%20type_Bottom%20Chart=vertical&knob-enable%20external%20tooltip_Top%20Chart=true&knob-enable%20external%20tooltip_Bottom%20Chart=true&knob-external%20tooltip%20placement_Top%20Chart=left&knob-external%20tooltip%20placement_Bottom%20Chart=left', - { right: 120, top: 80 }, + { right: 200, top: 80 }, { screenshotSelector: '#story-root', }, ); }); + it('show synced crosshairs', async () => { await common.expectChartWithMouseAtUrlToMatchScreenshot( 'http://localhost:9001/?path=/story/interactions--cursor-update-action&knob-local%20tooltip%20type_Top%20Chart=vertical&knob-local%20tooltip%20type_Bottom%20Chart=vertical&knob-enable%20external%20tooltip_Top%20Chart=true&knob-enable%20external%20tooltip_Bottom%20Chart=false&knob-external%20tooltip%20placement_Top%20Chart=left&knob-external%20tooltip%20placement_Bottom%20Chart=left', - { right: 120, top: 80 }, + { right: 200, top: 80 }, + { + screenshotSelector: '#story-root', + }, + ); + }); + + it('show synced extra values in legend', async () => { + await common.expectChartWithMouseAtUrlToMatchScreenshot( + 'http://localhost:9001/?path=/story/interactions--cursor-update-action&knob-Series type_Top Chart=line&knob-enable external tooltip_Top Chart=true&knob-Series type_Bottom Chart=line&knob-enable external tooltip_Bottom Chart=false', + { right: 200, top: 80 }, { screenshotSelector: '#story-root', }, diff --git a/packages/osd-charts/src/chart_types/xy_chart/state/selectors/get_tooltip_values_highlighted_geoms.ts b/packages/osd-charts/src/chart_types/xy_chart/state/selectors/get_tooltip_values_highlighted_geoms.ts index ba998115b801..0d1807544792 100644 --- a/packages/osd-charts/src/chart_types/xy_chart/state/selectors/get_tooltip_values_highlighted_geoms.ts +++ b/packages/osd-charts/src/chart_types/xy_chart/state/selectors/get_tooltip_values_highlighted_geoms.ts @@ -124,7 +124,7 @@ function getTooltipAndHighlightFromValue( return EMPTY_VALUES; } - if (tooltipType === TooltipType.None) { + if (tooltipType === TooltipType.None && !externalPointerEvent) { return EMPTY_VALUES; } diff --git a/packages/osd-charts/src/components/__snapshots__/chart.test.tsx.snap b/packages/osd-charts/src/components/__snapshots__/chart.test.tsx.snap index b51d62d8c391..12a57953b38a 100644 --- a/packages/osd-charts/src/components/__snapshots__/chart.test.tsx.snap +++ b/packages/osd-charts/src/components/__snapshots__/chart.test.tsx.snap @@ -1,3 +1,3 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Chart should render the legend name test 1`] = `"