-
Notifications
You must be signed in to change notification settings - Fork 16.5k
[line] growth vs factor option for 'Period Ratio' #970
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
Conversation
caravel/forms.py
Outdated
| '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 |
|
💯 🚢 |
| 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 :)
Uh oh!
There was an error while loading. Please reload this page.