diff --git a/x-pack/plugins/apm/public/components/app/correlations/index.tsx b/x-pack/plugins/apm/public/components/app/correlations/index.tsx
index 6e000521fe156..0614d1cbfe444 100644
--- a/x-pack/plugins/apm/public/components/app/correlations/index.tsx
+++ b/x-pack/plugins/apm/public/components/app/correlations/index.tsx
@@ -26,7 +26,6 @@ import { i18n } from '@kbn/i18n';
import { useHistory } from 'react-router-dom';
import { LatencyCorrelations } from './latency_correlations';
import { MlCorrelations } from './ml_correlations';
-import { MlScatter } from './ml_scatter';
import { ErrorCorrelations } from './error_correlations';
import { useUrlParams } from '../../../context/url_params_context/use_url_params';
import { createHref } from '../../shared/Links/url_helpers';
@@ -60,14 +59,7 @@ const demo1Tab = {
}),
component: MlCorrelations,
};
-const demo2Tab = {
- key: 'demo2',
- label: i18n.translate('xpack.apm.correlations.tabs.demo2Label', {
- defaultMessage: 'Demo 2',
- }),
- component: MlScatter,
-};
-const tabs = [latencyTab, errorRateTab, demo1Tab, demo2Tab];
+const tabs = [latencyTab, errorRateTab, demo1Tab];
export function Correlations() {
const license = useLicenseContext();
diff --git a/x-pack/plugins/apm/public/components/app/correlations/ml_scatter.tsx b/x-pack/plugins/apm/public/components/app/correlations/ml_scatter.tsx
deleted file mode 100644
index 9380cc2b4de7d..0000000000000
--- a/x-pack/plugins/apm/public/components/app/correlations/ml_scatter.tsx
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0; you may not use this file except in compliance with the Elastic License
- * 2.0.
- */
-
-import React from 'react';
-
-import { useParams } from 'react-router-dom';
-
-import { Scatter } from '../../../../../ml/public';
-
-import { useUrlParams } from '../../../context/url_params_context/use_url_params';
-
-interface Props {
- onClose: () => void;
-}
-
-export function MlScatter({ onClose }: Props) {
- const { serviceName } = useParams<{ serviceName?: string }>();
- const { urlParams } = useUrlParams();
- return (
-
- );
-}
diff --git a/x-pack/plugins/ml/public/application/components/correlations/index.ts b/x-pack/plugins/ml/public/application/components/correlations/index.ts
index 42d2be2dc5412..48e59e4b9797e 100644
--- a/x-pack/plugins/ml/public/application/components/correlations/index.ts
+++ b/x-pack/plugins/ml/public/application/components/correlations/index.ts
@@ -6,4 +6,3 @@
*/
export { Correlations } from './correlations';
-export { Scatter } from './scatter';
diff --git a/x-pack/plugins/ml/public/application/components/correlations/scatter.tsx b/x-pack/plugins/ml/public/application/components/correlations/scatter.tsx
deleted file mode 100644
index 0555dac134110..0000000000000
--- a/x-pack/plugins/ml/public/application/components/correlations/scatter.tsx
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0; you may not use this file except in compliance with the Elastic License
- * 2.0.
- */
-
-import React, { useEffect, useState, FC } from 'react';
-
-import { EuiButton, EuiProgress, EuiSpacer, EuiText } from '@elastic/eui';
-
-import { i18n } from '@kbn/i18n';
-
-import { useMlKibana } from '../../contexts/kibana';
-
-// Separate imports for lazy loadable VegaChart and related code
-import { VegaChart } from '../vega_chart';
-
-import { useCorrelations } from './use_correlations';
-
-const isErrorMessage = (arg: unknown): arg is Error => {
- return arg instanceof Error;
-};
-
-interface CorrelationsProps {
- environment?: string;
- kuery?: string;
- serviceName?: string;
- transactionName?: string;
- transactionType?: string;
- start?: string;
- end?: string;
-}
-
-export const Scatter: FC = (fetchOptions) => {
- const {
- services: { notifications },
- } = useMlKibana();
-
- const [allScatter, setAllScatter] = useState([]);
-
- const {
- error,
- scatter,
- isComplete,
- isRunning,
- progress,
- startFetch,
- cancelFetch,
- } = useCorrelations({
- index: 'apm-*',
- ...fetchOptions,
- });
-
- // cancel any running async partial request when unmounting the component
- useEffect(() => cancelFetch, []);
-
- useEffect(() => {
- const newAllScatter = allScatter
- .map((d) => {
- d.status = 'old';
- return d;
- })
- .concat(
- scatter.map((d) => {
- d.status = 'new';
- return d;
- })
- );
- setAllScatter(newAllScatter);
- }, [JSON.stringify(scatter)]);
-
- useEffect(() => {
- if (isComplete) {
- notifications.toasts.addSuccess('Finished');
- }
- }, [isComplete]);
-
- useEffect(() => {
- if (isErrorMessage(error)) {
- notifications.toasts.addDanger({
- title: i18n.translate('xpack.ml.correlations.error.title', {
- defaultMessage: 'An error occurred fetching correlations',
- }),
- text: error.toString(),
- });
- }
- }, [error]);
-
- const vegaSpec = {
- $schema: 'https://vega.github.io/schema/vega-lite/v5.json',
- description: 'A scatterplot with delta updates',
- width: 400,
- height: 400,
- data: { values: allScatter },
- mark: 'point',
- encoding: {
- x: { field: 'correlation', type: 'quantitative' },
- y: { field: 'docCount', type: 'quantitative', scale: { type: 'log' } },
- color: { field: 'status' },
- },
- };
-
- return (
- <>
-
-
- {i18n.translate('xpack.ml.correlations.description', {
- defaultMessage:
- 'What is slowing down my service? Correlations will help discover a slower performance in a particular cohort of your data.',
- })}
-