diff --git a/e2e/screenshots/legend_stories.test.ts-snapshots/legend-stories/should-break-multiline-legends-with-long-url-characters-chrome-linux.png b/e2e/screenshots/legend_stories.test.ts-snapshots/legend-stories/should-break-multiline-legends-with-long-url-characters-chrome-linux.png index e5968e2921..fab7169f2a 100644 Binary files a/e2e/screenshots/legend_stories.test.ts-snapshots/legend-stories/should-break-multiline-legends-with-long-url-characters-chrome-linux.png and b/e2e/screenshots/legend_stories.test.ts-snapshots/legend-stories/should-break-multiline-legends-with-long-url-characters-chrome-linux.png differ diff --git a/e2e/screenshots/tooltip.test.ts-snapshots/tooltip/chart-types/flamegraph/hide-prompt-with-no-actions-chrome-linux.png b/e2e/screenshots/tooltip.test.ts-snapshots/tooltip/chart-types/flamegraph/hide-prompt-with-no-actions-chrome-linux.png index fb0a3c88bb..106dacdaf0 100644 Binary files a/e2e/screenshots/tooltip.test.ts-snapshots/tooltip/chart-types/flamegraph/hide-prompt-with-no-actions-chrome-linux.png and b/e2e/screenshots/tooltip.test.ts-snapshots/tooltip/chart-types/flamegraph/hide-prompt-with-no-actions-chrome-linux.png differ diff --git a/e2e/screenshots/tooltip.test.ts-snapshots/tooltip/chart-types/flamegraph/pinning-with-selection-chrome-linux.png b/e2e/screenshots/tooltip.test.ts-snapshots/tooltip/chart-types/flamegraph/pinning-with-selection-chrome-linux.png index 3fa373e0e8..3debd980f2 100644 Binary files a/e2e/screenshots/tooltip.test.ts-snapshots/tooltip/chart-types/flamegraph/pinning-with-selection-chrome-linux.png and b/e2e/screenshots/tooltip.test.ts-snapshots/tooltip/chart-types/flamegraph/pinning-with-selection-chrome-linux.png differ diff --git a/e2e/screenshots/tooltip.test.ts-snapshots/tooltip/chart-types/flamegraph/show-prompt-with-actions-chrome-linux.png b/e2e/screenshots/tooltip.test.ts-snapshots/tooltip/chart-types/flamegraph/show-prompt-with-actions-chrome-linux.png index 53588113d2..359757621e 100644 Binary files a/e2e/screenshots/tooltip.test.ts-snapshots/tooltip/chart-types/flamegraph/show-prompt-with-actions-chrome-linux.png and b/e2e/screenshots/tooltip.test.ts-snapshots/tooltip/chart-types/flamegraph/show-prompt-with-actions-chrome-linux.png differ diff --git a/e2e/screenshots/tooltip.test.ts-snapshots/tooltip/chart-types/partition/pinning-with-selection-chrome-linux.png b/e2e/screenshots/tooltip.test.ts-snapshots/tooltip/chart-types/partition/pinning-with-selection-chrome-linux.png index 4fcbae8388..e6b70522cb 100644 Binary files a/e2e/screenshots/tooltip.test.ts-snapshots/tooltip/chart-types/partition/pinning-with-selection-chrome-linux.png and b/e2e/screenshots/tooltip.test.ts-snapshots/tooltip/chart-types/partition/pinning-with-selection-chrome-linux.png differ diff --git a/packages/charts/src/chart_types/metric/renderer/dom/_text.scss b/packages/charts/src/chart_types/metric/renderer/dom/_text.scss index b88bee0c57..3704f7870f 100644 --- a/packages/charts/src/chart_types/metric/renderer/dom/_text.scss +++ b/packages/charts/src/chart_types/metric/renderer/dom/_text.scss @@ -1,12 +1,3 @@ -@mixin lineClamp($maxLines) { - text-overflow: ellipsis; - display: -webkit-box; - -webkit-line-clamp: $maxLines; /* number of lines to show */ - line-clamp: $maxLines; - -webkit-box-orient: vertical; - overflow: hidden; -} - .echMetricText { position: relative; padding: 8px; diff --git a/packages/charts/src/components/_mixins.scss b/packages/charts/src/components/_mixins.scss index 45e72730e2..2d0c1ed884 100644 --- a/packages/charts/src/components/_mixins.scss +++ b/packages/charts/src/components/_mixins.scss @@ -7,3 +7,12 @@ overflow: hidden; min-width: 1px; } + +@mixin lineClamp($maxLines) { + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: $maxLines; /* number of lines to show */ + line-clamp: $maxLines; + -webkit-box-orient: vertical; + overflow: hidden; +} diff --git a/packages/charts/src/components/tooltip/components/_tooltip.scss b/packages/charts/src/components/tooltip/components/_tooltip.scss index 6ac9e2fb6c..e4bc67eca1 100644 --- a/packages/charts/src/components/tooltip/components/_tooltip.scss +++ b/packages/charts/src/components/tooltip/components/_tooltip.scss @@ -56,7 +56,7 @@ $transitionTime: 200ms; } .echTooltip__tableCell--truncate { - @include euiTextTruncate; + @include lineClamp(2); } &__metricRow { diff --git a/packages/charts/src/components/tooltip/placement.ts b/packages/charts/src/components/tooltip/placement.ts index 296ddc340a..67279d2247 100644 --- a/packages/charts/src/components/tooltip/placement.ts +++ b/packages/charts/src/components/tooltip/placement.ts @@ -25,7 +25,7 @@ export function getStylesFromPlacement( case 'top-end': case 'bottom-end': return { - width: maxWidth, + maxWidth, justifyContent: 'flex-end', }; case 'right': @@ -34,13 +34,13 @@ export function getStylesFromPlacement( case 'top-start': case 'bottom-start': return { - width: maxWidth, + maxWidth, justifyContent: 'flex-start', }; case 'top': case 'bottom': return { - width: maxWidth, + maxWidth, justifyContent: 'center', }; case 'auto': @@ -48,7 +48,7 @@ export function getStylesFromPlacement( case 'auto-end': default: return { - width: maxWidth, + maxWidth, }; } } diff --git a/packages/charts/src/utils/themes/dark_theme.ts b/packages/charts/src/utils/themes/dark_theme.ts index b57ee62836..0c4fb29e69 100644 --- a/packages/charts/src/utils/themes/dark_theme.ts +++ b/packages/charts/src/utils/themes/dark_theme.ts @@ -416,7 +416,7 @@ export const DARK_THEME: Theme = { }, bulletGraph: DARK_THEME_BULLET_STYLE, tooltip: { - maxWidth: 260, + maxWidth: 500, maxTableHeight: 120, defaultDotColor: Colors.White.keyword, }, diff --git a/packages/charts/src/utils/themes/legacy_dark_theme.ts b/packages/charts/src/utils/themes/legacy_dark_theme.ts index 8703f76e64..9feb8e39b8 100644 --- a/packages/charts/src/utils/themes/legacy_dark_theme.ts +++ b/packages/charts/src/utils/themes/legacy_dark_theme.ts @@ -422,7 +422,7 @@ export const LEGACY_DARK_THEME: Theme = { }, bulletGraph: DARK_THEME_BULLET_STYLE, tooltip: { - maxWidth: 260, + maxWidth: 500, maxTableHeight: 120, defaultDotColor: Colors.White.keyword, }, diff --git a/packages/charts/src/utils/themes/legacy_light_theme.ts b/packages/charts/src/utils/themes/legacy_light_theme.ts index 67980452ec..6aa8c9fb34 100644 --- a/packages/charts/src/utils/themes/legacy_light_theme.ts +++ b/packages/charts/src/utils/themes/legacy_light_theme.ts @@ -421,7 +421,7 @@ export const LEGACY_LIGHT_THEME: Theme = { }, bulletGraph: LIGHT_THEME_BULLET_STYLE, tooltip: { - maxWidth: 260, + maxWidth: 500, maxTableHeight: 120, defaultDotColor: Colors.Black.keyword, }, diff --git a/packages/charts/src/utils/themes/light_theme.ts b/packages/charts/src/utils/themes/light_theme.ts index c82fb3a130..55140fa46f 100644 --- a/packages/charts/src/utils/themes/light_theme.ts +++ b/packages/charts/src/utils/themes/light_theme.ts @@ -415,7 +415,7 @@ export const LIGHT_THEME: Theme = { }, bulletGraph: LIGHT_THEME_BULLET_STYLE, tooltip: { - maxWidth: 260, + maxWidth: 500, maxTableHeight: 120, defaultDotColor: Colors.Black.keyword, },