diff --git a/superset-frontend/src/chart/Chart.jsx b/superset-frontend/src/chart/Chart.jsx
index d13a6e59a12..3032b33a306 100644
--- a/superset-frontend/src/chart/Chart.jsx
+++ b/superset-frontend/src/chart/Chart.jsx
@@ -19,15 +19,15 @@
import PropTypes from 'prop-types';
import React from 'react';
import Alert from 'src/components/Alert';
-import { styled, logging } from '@superset-ui/core';
+import { styled, logging, t } from '@superset-ui/core';
import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags';
-import { Logger, LOG_ACTIONS_RENDER_CHART } from '../logger/LogUtils';
+import Button from 'src/components/Button';
import Loading from '../components/Loading';
-import RefreshChartOverlay from '../components/RefreshChartOverlay';
import ErrorBoundary from '../components/ErrorBoundary';
import ChartRenderer from './ChartRenderer';
import { ChartErrorMessage } from './ChartErrorMessage';
+import { Logger, LOG_ACTIONS_RENDER_CHART } from '../logger/LogUtils';
const propTypes = {
annotationData: PropTypes.object,
@@ -43,8 +43,8 @@ const propTypes = {
// formData contains chart's own filter parameter
// and merged with extra filter that current dashboard applying
formData: PropTypes.object.isRequired,
- height: PropTypes.number,
width: PropTypes.number,
+ height: PropTypes.number,
setControlValue: PropTypes.func,
timeout: PropTypes.number,
vizType: PropTypes.string.isRequired,
@@ -87,6 +87,17 @@ const Styles = styled.div`
}
`;
+const RefreshOverlayWrapper = styled.div`
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+`;
+
class Chart extends React.PureComponent {
constructor(props) {
super(props);
@@ -168,7 +179,6 @@ class Chart extends React.PureComponent {
render() {
const {
- width,
height,
chartAlert,
chartStatus,
@@ -212,11 +222,11 @@ class Chart extends React.PureComponent {
{!isLoading && !chartAlert && isFaded && (
-
+
+
+
)}
{isLoading && }
diff --git a/superset-frontend/src/components/RefreshChartOverlay.tsx b/superset-frontend/src/components/RefreshChartOverlay.tsx
deleted file mode 100644
index 7e727bd28b9..00000000000
--- a/superset-frontend/src/components/RefreshChartOverlay.tsx
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-import React from 'react';
-import { t, styled } from '@superset-ui/core';
-import Button from 'src/components/Button';
-
-type Callback = (...args: any[]) => void;
-
-interface Props {
- height: number;
- width: number;
- onQuery: Callback;
-}
-
-const RefreshOverlayWrapper = styled.div`
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
-`;
-
-class RefreshChartOverlay extends React.PureComponent {
- render() {
- return (
-
-
-
-
-
- );
- }
-}
-
-export default RefreshChartOverlay;