-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[line] growth vs factor option for 'Period Ratio' #970
Conversation
mistercrunch
commented
Aug 17, 2016
•
edited
Loading
edited
'period_ratio_type': (SelectField, { | ||
"label": _("Period Ratio Type"), | ||
"default": 'growth', | ||
"choices": self.choicify(('factor', 'growth')), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i18n?
@xrmx good catch, I made the options translatable |
💯 🚢 |
@@ -1038,7 +1038,14 @@ def get_df(self, query_obj=None): | |||
num_period_compare = form_data.get("num_period_compare") | |||
if num_period_compare: | |||
num_period_compare = int(num_period_compare) | |||
df = (df / df.shift(num_period_compare)) - 1 | |||
prt = form_data.get('period_ratio_type') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mistercrunch
would it make sense to add tests to the viz.py functions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be awesome to know that viz are rendering :)