diff --git a/superset-frontend/src/chart/ChartRenderer.jsx b/superset-frontend/src/chart/ChartRenderer.jsx
index 304644ede50f..2adfd33a8278 100644
--- a/superset-frontend/src/chart/ChartRenderer.jsx
+++ b/superset-frontend/src/chart/ChartRenderer.jsx
@@ -21,7 +21,6 @@ import { snakeCase } from 'lodash';
import PropTypes from 'prop-types';
import React from 'react';
import { SuperChart } from '@superset-ui/chart';
-import { Tooltip } from 'react-bootstrap';
import { Logger, LOG_ACTIONS_RENDER_CHART } from '../logger/LogUtils';
const propTypes = {
@@ -62,11 +61,8 @@ const defaultProps = {
class ChartRenderer extends React.Component {
constructor(props) {
super(props);
- this.state = {};
-
this.hasQueryResponseChange = false;
- this.setTooltip = this.setTooltip.bind(this);
this.handleAddFilter = this.handleAddFilter.bind(this);
this.handleRenderSuccess = this.handleRenderSuccess.bind(this);
this.handleRenderFailure = this.handleRenderFailure.bind(this);
@@ -76,13 +72,12 @@ class ChartRenderer extends React.Component {
onAddFilter: this.handleAddFilter,
onError: this.handleRenderFailure,
setControlValue: this.handleSetControlValue,
- setTooltip: this.setTooltip,
onFilterMenuOpen: this.props.onFilterMenuOpen,
onFilterMenuClose: this.props.onFilterMenuClose,
};
}
- shouldComponentUpdate(nextProps, nextState) {
+ shouldComponentUpdate(nextProps) {
const resultsReady =
nextProps.queryResponse &&
['success', 'rendered'].indexOf(nextProps.chartStatus) > -1 &&
@@ -98,7 +93,6 @@ class ChartRenderer extends React.Component {
nextProps.annotationData !== this.props.annotationData ||
nextProps.height !== this.props.height ||
nextProps.width !== this.props.width ||
- nextState.tooltip !== this.state.tooltip ||
nextProps.triggerRender ||
nextProps.formData.color_scheme !== this.props.formData.color_scheme
) {
@@ -108,10 +102,6 @@ class ChartRenderer extends React.Component {
return false;
}
- setTooltip(tooltip) {
- this.setState({ tooltip });
- }
-
handleAddFilter(col, vals, merge = true, refresh = true) {
this.props.addFilter(col, vals, merge, refresh);
}
@@ -164,33 +154,6 @@ class ChartRenderer extends React.Component {
}
}
- renderTooltip() {
- const { tooltip } = this.state;
- if (tooltip && tooltip.content) {
- return (
-
- {typeof tooltip.content === 'string' ? (
-
- ) : (
- tooltip.content
- )}
-
- );
- }
- return null;
- }
-
render() {
const {
chartAlert,
@@ -233,25 +196,22 @@ class ChartRenderer extends React.Component {
: snakeCaseVizType;
return (
- <>
- {this.renderTooltip()}
-
- >
+
);
}
}