[revert] reverting big num changes (#2567)

* Revert "[big num] make sure scatterplot dots align properly (#2559)"

This reverts commit f24ddfd467.

* Revert "Revert "measure x axis labels too and use the longest to determine margins" (#2550)"

This reverts commit fe68bc31c3.

* Revert "[bug num vis] fix sizing for single digits (#2548)"

This reverts commit 3d2c791ff1.

* revert all big num changes.

* fix linting

* make document global, fix linting
This commit is contained in:
Alanna Scott
2017-04-06 13:15:42 -07:00
committed by GitHub
parent c581ea8661
commit 1fb21b8b45
5 changed files with 107 additions and 190 deletions

View File

@@ -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,