Skip to content

Commit

Permalink
Removing the compare options on the big number total
Browse files Browse the repository at this point in the history
  • Loading branch information
michellethomas committed Apr 7, 2016
1 parent 794eb36 commit ce54165
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions caravel/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,7 @@ def get_data(self):
'compare_suffix': form_data.get('compare_suffix', ''),
}


class BigNumberTotalViz(BaseViz):

"""Put emphasis on a single metric with this big number viz"""
Expand All @@ -612,8 +613,6 @@ class BigNumberTotalViz(BaseViz):
'label': None,
'fields': (
'metric',
'compare_lag',
'compare_suffix',
'subheader',
'y_axis_format',
)
Expand Down Expand Up @@ -642,12 +641,8 @@ def get_data(self):
form_data = self.form_data
df = self.get_df()
df = df.sort(columns=df.columns[0])
compare_lag = form_data.get("compare_lag", "")
compare_lag = int(compare_lag) if compare_lag and compare_lag.isdigit() else 0
return {
'data': df.values.tolist(),
'compare_lag': compare_lag,
'compare_suffix': form_data.get('compare_suffix', ''),
'subheader': form_data.get('subheader', ''),
}

Expand Down

0 comments on commit ce54165

Please sign in to comment.