Fix tooltip (#6895)

This commit is contained in:
Beto Dealmeida 2019-02-19 10:32:14 -08:00 committed by Christine Chambers
parent f715f36ed3
commit 3f96b0c5c4
2 changed files with 3 additions and 2 deletions

View File

@ -69,7 +69,7 @@ class ChartRenderer extends React.Component {
this.handleRenderFailure = this.handleRenderFailure.bind(this);
}
shouldComponentUpdate(nextProps) {
shouldComponentUpdate(nextProps, nextState) {
const resultsReady =
nextProps.queryResponse &&
['success', 'rendered'].indexOf(nextProps.chartStatus) > -1 &&
@ -84,6 +84,7 @@ 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) {
return true;
}

View File

@ -71,7 +71,7 @@ export function commonLayerProps(formData, setTooltip, onSelect) {
setTooltip({
content: tooltipContentGenerator(o),
x: o.x,
y: o.y,
y: o.y + 30,
});
} else {
setTooltip(null);