- {veil}
+
}
@@ -396,7 +388,6 @@ export const GaugeComponent: FC = memo(
ariaLabel={args.ariaLabel}
ariaUseDefaultSummary={!args.ariaLabel}
onRenderChange={onRenderChange}
- onResize={onResize}
locale={i18n.getLocale()}
{...getOverridesFor(overrides, 'settings')}
/>
diff --git a/src/plugins/chart_expressions/expression_gauge/public/expression_renderers/gauge_renderer.tsx b/src/plugins/chart_expressions/expression_gauge/public/expression_renderers/gauge_renderer.tsx
index 9759ceca52725..74c3d8bb52737 100644
--- a/src/plugins/chart_expressions/expression_gauge/public/expression_renderers/gauge_renderer.tsx
+++ b/src/plugins/chart_expressions/expression_gauge/public/expression_renderers/gauge_renderer.tsx
@@ -90,7 +90,6 @@ export const gaugeRenderer: (
chartsThemeService={plugins.charts.theme}
paletteService={getPaletteService()}
renderComplete={renderComplete}
- shouldUseVeil={handlers.shouldUseSizeTransitionVeil()}
uiState={handlers.uiState as PersistedState}
/>
diff --git a/src/plugins/chart_expressions/expression_partition_vis/public/components/__snapshots__/partition_vis_component.test.tsx.snap b/src/plugins/chart_expressions/expression_partition_vis/public/components/__snapshots__/partition_vis_component.test.tsx.snap
index f7c57d6e765df..441d0d92b56b2 100644
--- a/src/plugins/chart_expressions/expression_partition_vis/public/components/__snapshots__/partition_vis_component.test.tsx.snap
+++ b/src/plugins/chart_expressions/expression_partition_vis/public/components/__snapshots__/partition_vis_component.test.tsx.snap
@@ -426,8 +426,8 @@ exports[`PartitionVisComponent should render correct structure for donut 1`] = `
"barBackground": "#343741",
"border": "#EDF0F5",
"colorBands": Array [
- "#D9C6EF",
"#AA87D1",
+ "#D9C6EF",
],
"fallbackBandColor": "#98A2B3",
"minHeight": 64,
@@ -1342,8 +1342,8 @@ exports[`PartitionVisComponent should render correct structure for mosaic 1`] =
"barBackground": "#343741",
"border": "#EDF0F5",
"colorBands": Array [
- "#D9C6EF",
"#AA87D1",
+ "#D9C6EF",
],
"fallbackBandColor": "#98A2B3",
"minHeight": 64,
@@ -2318,8 +2318,8 @@ exports[`PartitionVisComponent should render correct structure for multi-metric
"barBackground": "#343741",
"border": "#EDF0F5",
"colorBands": Array [
- "#D9C6EF",
"#AA87D1",
+ "#D9C6EF",
],
"fallbackBandColor": "#98A2B3",
"minHeight": 64,
@@ -3296,8 +3296,8 @@ exports[`PartitionVisComponent should render correct structure for pie 1`] = `
"barBackground": "#343741",
"border": "#EDF0F5",
"colorBands": Array [
- "#D9C6EF",
"#AA87D1",
+ "#D9C6EF",
],
"fallbackBandColor": "#98A2B3",
"minHeight": 64,
@@ -4212,8 +4212,8 @@ exports[`PartitionVisComponent should render correct structure for treemap 1`] =
"barBackground": "#343741",
"border": "#EDF0F5",
"colorBands": Array [
- "#D9C6EF",
"#AA87D1",
+ "#D9C6EF",
],
"fallbackBandColor": "#98A2B3",
"minHeight": 64,
@@ -5083,8 +5083,8 @@ exports[`PartitionVisComponent should render correct structure for waffle 1`] =
"barBackground": "#343741",
"border": "#EDF0F5",
"colorBands": Array [
- "#D9C6EF",
"#AA87D1",
+ "#D9C6EF",
],
"fallbackBandColor": "#98A2B3",
"minHeight": 64,
diff --git a/src/plugins/chart_expressions/expression_xy/public/components/__snapshots__/xy_chart.test.tsx.snap b/src/plugins/chart_expressions/expression_xy/public/components/__snapshots__/xy_chart.test.tsx.snap
index a2f62afd3aee6..73c03e9c1c2f0 100644
--- a/src/plugins/chart_expressions/expression_xy/public/components/__snapshots__/xy_chart.test.tsx.snap
+++ b/src/plugins/chart_expressions/expression_xy/public/components/__snapshots__/xy_chart.test.tsx.snap
@@ -300,18 +300,6 @@ exports[`XYChart component it renders area 1`] = `
}
}
>
-
-
-
-
-
-
-
-
-
-
{
renderComplete: jest.fn(),
timeFormat: 'MMM D, YYYY @ HH:mm:ss.SSS',
setChartSize: jest.fn(),
- shouldUseVeil: false,
};
});
diff --git a/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.tsx b/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.tsx
index 7e4c5a5c6b974..c4271d131cdf6 100644
--- a/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.tsx
+++ b/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.tsx
@@ -52,11 +52,7 @@ import {
LegendSizeToPixels,
} from '@kbn/visualizations-plugin/common/constants';
import { PersistedState } from '@kbn/visualizations-plugin/public';
-import {
- useSizeTransitionVeil,
- getOverridesFor,
- ChartSizeSpec,
-} from '@kbn/chart-expressions-common';
+import { getOverridesFor, ChartSizeSpec } from '@kbn/chart-expressions-common';
import type {
FilterEvent,
BrushEvent,
@@ -148,7 +144,6 @@ export type XYChartRenderProps = Omit & {
syncCursor: boolean;
eventAnnotationService: EventAnnotationServiceType;
renderComplete: () => void;
- shouldUseVeil: boolean;
uiState?: PersistedState;
timeFormat: string;
setChartSize: (chartSizeSpec: ChartSizeSpec) => void;
@@ -211,11 +206,8 @@ export function XYChart({
syncColors,
syncTooltips,
syncCursor,
- shouldUseVeil,
-
useLegacyTimeAxis,
renderComplete,
-
uiState,
timeFormat,
overrides,
@@ -307,30 +299,28 @@ export function XYChart({
const isTimeViz = isTimeChart(dataLayers);
- const chartSizeSpec: ChartSizeSpec =
- isTimeViz && !isHorizontalChart(dataLayers)
- ? {
- aspectRatio: {
- x: 16,
- y: 9,
- },
- minDimensions: {
- y: { value: 300, unit: 'pixels' },
- x: { value: 100, unit: 'percentage' },
- },
- }
- : {
- maxDimensions: {
- x: { value: 100, unit: 'percentage' },
- y: { value: 100, unit: 'percentage' },
- },
- };
-
- const { veil, onResize, containerRef } = useSizeTransitionVeil(
- chartSizeSpec,
- setChartSize,
- shouldUseVeil
- );
+ useEffect(() => {
+ const chartSizeSpec: ChartSizeSpec =
+ isTimeViz && !isHorizontalChart(dataLayers)
+ ? {
+ aspectRatio: {
+ x: 16,
+ y: 9,
+ },
+ minDimensions: {
+ y: { value: 300, unit: 'pixels' },
+ x: { value: 100, unit: 'percentage' },
+ },
+ }
+ : {
+ maxDimensions: {
+ x: { value: 100, unit: 'percentage' },
+ y: { value: 100, unit: 'percentage' },
+ },
+ };
+
+ setChartSize(chartSizeSpec);
+ }, [dataLayers, isTimeViz, setChartSize]);
const formattedDatatables = useMemo(
() =>
@@ -748,8 +738,7 @@ export function XYChart({
);
return (
-
- {veil}
+
{showLegend !== undefined && uiState && (
}
onRenderChange={onRenderChange}
- onResize={onResize}
onPointerUpdate={syncCursor ? handleCursorUpdate : undefined}
externalPointerEvents={{
tooltip: { visible: syncTooltips, placement: Placement.Right },
diff --git a/src/plugins/chart_expressions/expression_xy/public/expression_renderers/xy_chart_renderer.tsx b/src/plugins/chart_expressions/expression_xy/public/expression_renderers/xy_chart_renderer.tsx
index 2d88ed53ac3f0..53091eb47acb5 100644
--- a/src/plugins/chart_expressions/expression_xy/public/expression_renderers/xy_chart_renderer.tsx
+++ b/src/plugins/chart_expressions/expression_xy/public/expression_renderers/xy_chart_renderer.tsx
@@ -284,7 +284,6 @@ export const getXyChartRenderer = ({
syncColors={config.syncColors}
syncTooltips={config.syncTooltips}
syncCursor={config.syncCursor}
- shouldUseVeil={handlers.shouldUseSizeTransitionVeil()}
uiState={handlers.uiState as PersistedState}
renderComplete={renderComplete}
setChartSize={setChartSize}
diff --git a/src/plugins/expressions/common/execution/execution.ts b/src/plugins/expressions/common/execution/execution.ts
index 03a0923b4b313..593e437fd9dc7 100644
--- a/src/plugins/expressions/common/execution/execution.ts
+++ b/src/plugins/expressions/common/execution/execution.ts
@@ -287,7 +287,6 @@ export class Execution<
isSyncColorsEnabled: () => execution.params.syncColors!,
isSyncCursorEnabled: () => execution.params.syncCursor!,
isSyncTooltipsEnabled: () => execution.params.syncTooltips!,
- shouldUseSizeTransitionVeil: () => execution.params.shouldUseSizeTransitionVeil!,
...execution.executor.context,
getExecutionContext: () => execution.params.executionContext,
};
diff --git a/src/plugins/expressions/common/execution/types.ts b/src/plugins/expressions/common/execution/types.ts
index ac216515a3f1b..03dbcc8a6ff13 100644
--- a/src/plugins/expressions/common/execution/types.ts
+++ b/src/plugins/expressions/common/execution/types.ts
@@ -72,11 +72,6 @@ export interface ExecutionContext
*/
isSyncTooltipsEnabled?: () => boolean;
- /**
- * Returns whether or not to use the size transition veil when resizing visualizations.
- */
- shouldUseSizeTransitionVeil?: () => boolean;
-
/**
* Contains the meta-data about the source of the expression.
*/
diff --git a/src/plugins/expressions/common/expression_renderers/types.ts b/src/plugins/expressions/common/expression_renderers/types.ts
index 46908e8b38e6e..e5a295e855458 100644
--- a/src/plugins/expressions/common/expression_renderers/types.ts
+++ b/src/plugins/expressions/common/expression_renderers/types.ts
@@ -98,8 +98,6 @@ export interface IInterpreterRenderHandlers {
isSyncTooltipsEnabled(): boolean;
- shouldUseSizeTransitionVeil(): boolean;
-
/**
* This uiState interface is actually `PersistedState` from the visualizations plugin,
* but expressions cannot know about vis or it creates a mess of circular dependencies.
diff --git a/src/plugins/expressions/common/service/expressions_services.ts b/src/plugins/expressions/common/service/expressions_services.ts
index 2683921bc038b..e73e07a387c46 100644
--- a/src/plugins/expressions/common/service/expressions_services.ts
+++ b/src/plugins/expressions/common/service/expressions_services.ts
@@ -156,11 +156,6 @@ export interface ExpressionExecutionParams {
syncTooltips?: boolean;
- // if this is set to true, a veil will be shown when resizing visualizations in response
- // to a chart resize event (see src/plugins/chart_expressions/common/chart_size_transition_veil.tsx).
- // This should be only set to true if the client will be responding to the resize events
- shouldUseSizeTransitionVeil?: boolean;
-
inspectorAdapters?: Adapters;
executionContext?: KibanaExecutionContext;
diff --git a/src/plugins/expressions/public/loader.ts b/src/plugins/expressions/public/loader.ts
index 0a3c0e0990645..f10b8db1f1287 100644
--- a/src/plugins/expressions/public/loader.ts
+++ b/src/plugins/expressions/public/loader.ts
@@ -60,7 +60,6 @@ export class ExpressionLoader {
syncColors: params?.syncColors,
syncTooltips: params?.syncTooltips,
syncCursor: params?.syncCursor,
- shouldUseSizeTransitionVeil: params?.shouldUseSizeTransitionVeil,
hasCompatibleActions: params?.hasCompatibleActions,
getCompatibleCellValueActions: params?.getCompatibleCellValueActions,
executionContext: params?.executionContext,
@@ -149,7 +148,6 @@ export class ExpressionLoader {
syncColors: params.syncColors,
syncCursor: params?.syncCursor,
syncTooltips: params.syncTooltips,
- shouldUseSizeTransitionVeil: params.shouldUseSizeTransitionVeil,
executionContext: params.executionContext,
partial: params.partial,
throttle: params.throttle,
diff --git a/src/plugins/expressions/public/render.ts b/src/plugins/expressions/public/render.ts
index 0b494f30b2e69..a7b919625b8d6 100644
--- a/src/plugins/expressions/public/render.ts
+++ b/src/plugins/expressions/public/render.ts
@@ -33,7 +33,6 @@ export interface ExpressionRenderHandlerParams {
syncCursor?: boolean;
syncTooltips?: boolean;
interactive?: boolean;
- shouldUseSizeTransitionVeil?: boolean;
hasCompatibleActions?: (event: ExpressionRendererEvent) => Promise;
getCompatibleCellValueActions?: (data: object[]) => Promise;
executionContext?: KibanaExecutionContext;
@@ -63,7 +62,6 @@ export class ExpressionRenderHandler {
syncColors,
syncTooltips,
syncCursor,
- shouldUseSizeTransitionVeil,
interactive,
hasCompatibleActions = async () => false,
getCompatibleCellValueActions = async () => [],
@@ -115,9 +113,6 @@ export class ExpressionRenderHandler {
isSyncCursorEnabled: () => {
return syncCursor || true;
},
- shouldUseSizeTransitionVeil: () => {
- return Boolean(shouldUseSizeTransitionVeil);
- },
isInteractive: () => {
return interactive ?? true;
},
diff --git a/src/plugins/expressions/public/types/index.ts b/src/plugins/expressions/public/types/index.ts
index 23a17fbcea1dc..c1b7dc8cc6369 100644
--- a/src/plugins/expressions/public/types/index.ts
+++ b/src/plugins/expressions/public/types/index.ts
@@ -52,10 +52,6 @@ export interface IExpressionLoaderParams {
syncColors?: boolean;
syncCursor?: boolean;
syncTooltips?: boolean;
- // if this is set to true, a veil will be shown when resizing visualizations in response
- // to a chart resize event (see src/plugins/chart_expressions/common/chart_size_transition_veil.tsx).
- // This should be only set to true if the client will be responding to the resize events
- shouldUseSizeTransitionVeil?: boolean;
hasCompatibleActions?: ExpressionRenderHandlerParams['hasCompatibleActions'];
getCompatibleCellValueActions?: ExpressionRenderHandlerParams['getCompatibleCellValueActions'];
executionContext?: KibanaExecutionContext;
diff --git a/src/plugins/presentation_util/public/__stories__/render.tsx b/src/plugins/presentation_util/public/__stories__/render.tsx
index e02f1c803d332..ca9f968842270 100644
--- a/src/plugins/presentation_util/public/__stories__/render.tsx
+++ b/src/plugins/presentation_util/public/__stories__/render.tsx
@@ -18,7 +18,6 @@ export const defaultHandlers: IInterpreterRenderHandlers = {
isSyncColorsEnabled: () => false,
isSyncCursorEnabled: () => true,
isSyncTooltipsEnabled: () => false,
- shouldUseSizeTransitionVeil: () => false,
isInteractive: () => true,
getExecutionContext: () => undefined,
done: action('done'),
diff --git a/x-pack/plugins/canvas/canvas_plugin_src/renderers/__stories__/render.tsx b/x-pack/plugins/canvas/canvas_plugin_src/renderers/__stories__/render.tsx
index c921bf5db2fe1..e53dce0a46886 100644
--- a/x-pack/plugins/canvas/canvas_plugin_src/renderers/__stories__/render.tsx
+++ b/x-pack/plugins/canvas/canvas_plugin_src/renderers/__stories__/render.tsx
@@ -17,7 +17,6 @@ export const defaultHandlers: RendererHandlers = {
isSyncColorsEnabled: () => false,
isSyncCursorEnabled: () => true,
isSyncTooltipsEnabled: () => false,
- shouldUseSizeTransitionVeil: () => false,
isInteractive: () => true,
onComplete: (fn) => undefined,
onEmbeddableDestroyed: action('onEmbeddableDestroyed'),
diff --git a/x-pack/plugins/canvas/public/lib/create_handlers.ts b/x-pack/plugins/canvas/public/lib/create_handlers.ts
index b9c0ad97f4eb1..374bdaff99721 100644
--- a/x-pack/plugins/canvas/public/lib/create_handlers.ts
+++ b/x-pack/plugins/canvas/public/lib/create_handlers.ts
@@ -29,7 +29,6 @@ export const createBaseHandlers = (): IInterpreterRenderHandlers => ({
isSyncColorsEnabled: () => false,
isSyncTooltipsEnabled: () => false,
isSyncCursorEnabled: () => true,
- shouldUseSizeTransitionVeil: () => false,
isInteractive: () => true,
getExecutionContext: () => undefined,
});
diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.tsx
index 0fda38c5cfdd6..842904741ec9b 100644
--- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.tsx
+++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.tsx
@@ -781,7 +781,6 @@ export const VisualizationWrapper = ({
onRender$={onRenderHandler}
inspectorAdapters={lensInspector.adapters}
executionContext={executionContext}
- shouldUseSizeTransitionVeil={true}
renderMode="edit"
renderError={(errorMessage?: string | null, error?: ExpressionRenderError | null) => {
const errorsFromRequest = getOriginalRequestErrorMessages(error || null);
diff --git a/x-pack/plugins/uptime/public/legacy_uptime/components/common/charts/__snapshots__/donut_chart.test.tsx.snap b/x-pack/plugins/uptime/public/legacy_uptime/components/common/charts/__snapshots__/donut_chart.test.tsx.snap
index 6f9a8644bb706..363aee4953ab5 100644
--- a/x-pack/plugins/uptime/public/legacy_uptime/components/common/charts/__snapshots__/donut_chart.test.tsx.snap
+++ b/x-pack/plugins/uptime/public/legacy_uptime/components/common/charts/__snapshots__/donut_chart.test.tsx.snap
@@ -209,8 +209,8 @@ exports[`DonutChart component passes correct props without errors for valid prop
"barBackground": "#343741",
"border": "#EDF0F5",
"colorBands": Array [
- "#D9C6EF",
"#AA87D1",
+ "#D9C6EF",
],
"fallbackBandColor": "#98A2B3",
"minHeight": 64,
diff --git a/x-pack/plugins/uptime/public/legacy_uptime/components/common/charts/__snapshots__/monitor_bar_series.test.tsx.snap b/x-pack/plugins/uptime/public/legacy_uptime/components/common/charts/__snapshots__/monitor_bar_series.test.tsx.snap
index 7eca794bd6270..7b5da3fc31599 100644
--- a/x-pack/plugins/uptime/public/legacy_uptime/components/common/charts/__snapshots__/monitor_bar_series.test.tsx.snap
+++ b/x-pack/plugins/uptime/public/legacy_uptime/components/common/charts/__snapshots__/monitor_bar_series.test.tsx.snap
@@ -6,6 +6,7 @@ exports[`MonitorBarSeries component renders if the data series is present 1`] =
>
{
@@ -85,7 +85,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await PageObjects.discover.brushHistogram();
await PageObjects.discover.waitUntilSearchingHasFinished();
- renderingCountInc = 2;
+ renderingCountInc = 3; // Multiple renders caused by https://github.com/elastic/kibana/issues/177055
await retry.waitFor('chart rendering complete after being brushed', async () => {
const actualCount = await elasticChart.getVisualizationRenderingCount();
const expectedCount = prevRenderingCount + renderingCountInc * 2;
diff --git a/yarn.lock b/yarn.lock
index 3ec12c6860fa7..26667fb895004 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1658,10 +1658,10 @@
dependencies:
object-hash "^1.3.0"
-"@elastic/charts@63.1.0":
- version "63.1.0"
- resolved "https://registry.yarnpkg.com/@elastic/charts/-/charts-63.1.0.tgz#6348ffe01d6e77ddd150382b57515134f76293b3"
- integrity sha512-UdzsErplc5z2cQxRY7N4kXZXRfb0pdDdsC7V4ag2WIlDiYDpygB3iThb83sG99E9KtOqIkHPE5nyDmWI6GwfOg==
+"@elastic/charts@64.0.0":
+ version "64.0.0"
+ resolved "https://registry.yarnpkg.com/@elastic/charts/-/charts-64.0.0.tgz#fd9bd6b3a1d123a7c44c3c5bab21e13f9f128021"
+ integrity sha512-qTsxlO4kgBxvK56ixWp406AIe0UTb1kfcbD/y8Nz/l5cE2u0JP/Cuajp5VziLKmY4NjHswPg9qjIHC87lG1hDw==
dependencies:
"@popperjs/core" "^2.11.8"
bezier-easing "^2.1.0"
@@ -1679,7 +1679,6 @@
react-redux "^7.1.0"
redux "^4.0.4"
reselect "^4.0.0"
- resize-observer-polyfill "^1.5.1"
ts-debounce "^4.0.0"
utility-types "^3.10.0"
uuid "^9"