mirror of
https://github.com/apache/superset.git
synced 2026-04-11 04:15:33 +00:00
[revert] reverting big num changes (#2567)
* Revert "[big num] make sure scatterplot dots align properly (#2559)" This reverts commitf24ddfd467. * Revert "Revert "measure x axis labels too and use the longest to determine margins" (#2550)" This reverts commitfe68bc31c3. * Revert "[bug num vis] fix sizing for single digits (#2548)" This reverts commit3d2c791ff1. * revert all big num changes. * fix linting * make document global, fix linting
This commit is contained in:
@@ -57,22 +57,19 @@ class ChartContainer extends React.PureComponent {
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps) {
|
||||
if (this.shouldRenderViz(prevProps)) {
|
||||
if (
|
||||
(
|
||||
prevProps.queryResponse !== this.props.queryResponse ||
|
||||
prevProps.height !== this.props.height ||
|
||||
this.props.triggerRender
|
||||
) && !this.props.queryResponse.error
|
||||
&& this.props.chartStatus !== 'failed'
|
||||
&& this.props.chartStatus !== 'stopped'
|
||||
) {
|
||||
this.renderViz();
|
||||
}
|
||||
}
|
||||
|
||||
shouldRenderViz(prevProps) {
|
||||
const hasHeightChanged = prevProps.height !== this.props.height;
|
||||
const hasQueryChanged = prevProps.queryResponse !== this.props.queryResponse;
|
||||
const hasErrors = this.props.queryResponse && this.props.queryResponse.error;
|
||||
|
||||
return (hasQueryChanged || hasHeightChanged || this.props.triggerRender)
|
||||
&& !hasErrors
|
||||
&& this.props.chartStatus !== 'failed'
|
||||
&& this.props.chartStatus !== 'stopped';
|
||||
}
|
||||
|
||||
getMockedSliceObject() {
|
||||
const props = this.props;
|
||||
const getHeight = () => {
|
||||
@@ -105,7 +102,7 @@ class ChartContainer extends React.PureComponent {
|
||||
|
||||
height: getHeight,
|
||||
|
||||
render_template: function (s) {
|
||||
render_template: (s) => {
|
||||
const context = {
|
||||
width: this.width,
|
||||
height: this.height,
|
||||
|
||||
Reference in New Issue
Block a user